You are on page 1of 9

PL/SQL Training

AUDIENCE: Database administrators, application developers, and database operators.
PREREQUISITES: Familiarity with Oracle Database 10g database technology; an
understanding of the basic concepts of relational databases and the SQL programming
language; ability to write queries against single and multiple tables, manipulate data in
tables, create database objects, and query metadata. For beginners in SQL there are on-
line trainings SQL Fundamentals I Express Guide (30 hours) and SQL Fundamentals II
Express Guide (15 hours).
LEARNING OBJECTIVES: Skills in writing simple stored procedures (including triggers) in
PL/SQL using control structures, cursors and records.

Day 1.
1. Self-study using C.Allen “Oracle PL/SQL 101” (Chapter 8), consulting
teacher, performing corresponding exercises from the book.

1. What is PL/SQL (0.5 hour)
1. PL/SQL in general
2. SQL, PL/SQL и SQL*Plus
3. Stored procedures, functions, triggers
4. Stored procedures and SQL-scripts

2. Structure of PL/SQL block (0.5 hour)
1. Header
2. Exercise Fig.8-1.
3. Declarations
4. Executable section
5. Exceptions

3. Procedures and functions call (0.5 hour)
1. Procedures and functions call
2. Exercise Fig.8-2.

4. Variables and constants in PL/SQL (0.5 hour)
1. Declaration of variable in PL/SQL
2. Declaration of constant in PL/SQL
3. Assigning value to a variable
4. Exercises Fig.8-3, 8-4.
5. Using variables

2. Online training in MyLearning (Introduction to PL/SQL) - 3 hours.

3. Online training in MyLearning (Creating Stored Procedures and
Functions) – 3 hours.

Day 2.

Error handling (1 hour) 1.8-8 4. Exercise Fig.Allen “Oracle PL/SQL 101” (Chapter 8). LOOP b. Cursors 5.8-12 7. Exercise Fig.8-10 5. Answering control questions for Chapter 8 of the book to teacher (0.8-6 c. Records in PL/SQL 7. Control structure in PL/SQL (1. Exercise Fig. consulting teacher. Exceptions 2. Online training in MyLearning (Using Control Structures) – 2 hours.Exercise Fig. Cursor declaration and cursor attributes 6. 6. performing corresponding exercises from the book. Instruction WHERE CURRENT OF 10. Exceptions defined by programmer 5. 8. System exceptions 3. Self-study using C. Loop WHILE d.Exercise Fig. Cursor loop FOR 9. Online training in MyLearning (Explicit Cursors and Exception Errors) – 3 hours.Allen “Oracle PL/SQL 101” (Chapter 8). consulting teacher.8-11 4.8-5 3.8-7 e. FETCH и CLOSE 8.Allen “Oracle PL/SQL 101” (Chapter 8). consulting teacher. Exercise Fig.8-9 11. 4. Loop FOR f. Loops a. Day 3. Commands OPEN.Nested loops 12.5 hour).5 hour) 1. Self-study using C. Exercise Fig. Operator IF 2. 6. . 9. 5. Self-study using C. performing corresponding exercises from the book. performing corresponding exercises from the book. Exercise Fig.

PL/SQL packages (1 hours) 1.9-11 – 9-17. Trigger modification 4. Time operations (0. Self-study using S. 9-7 3. Exercise Fig. PL/SQL and Oracle server interaction (1 hour) 1. 11. Exercise Fig. Triggers (1 hours) 1. Creation of ODBC-connection 2. 7. Exercise Fig. Details for triggers 12.9-9 10. consulting teacher. . View and edit Access database 4. Exercise Fig.9-10 3. Exercise Fig. DML in PL/SQL. Coding conventions (0.9-18 . Explicit and implicit cursors 9. Online training in MyLearning (PL/SQL Packages) – 2 hours.5 hour) 1. or implicit cursors 4. Package syntax 2. Command TIMING for real time counting 4. 13. Day 4.9-8 10.9-20. Time measuring in a program 2. Exercise Fig. Exercise Fig. 3.9-2 – 9-5 5. Trigger types 2. 11.Urman “Oracle 9i PL/SQL programming” (Chapter 3).9-1 3. 5.9-21 – 9-23. Answering control questions for Chapter 8 of the book to teacher (1 hour). ODBC (1 hours) 1.5 hour) 8. Dynamic declaration of variable types in PL/SQL 2. 12. Exercise Fig.9-6. performing corresponding exercises from the book. Import Oracle data into Excel 6. Exercise Fig. Online training in MyLearning (Using PL/SQL with an Oracle Server) – 2 hours.

sql i. Using SQL in PL/SQL b. SQL and PL/SQL (5 hours) 1. CASE without ELSE b. Bulk bind l. Pseudo columns a. UPDATE f. COMMIT and ROLLBACK b. SQL operators a. 14. GRANT.sql 14. Exercise select. performing corresponding exercises from the book. Synonims 3. CASE with label c. CURRVAL и NEXTVAL b. Table reference p. CASE with search d. Exercise update.sql e.sql m. GOTO operator a. Self-study using S. consulting teacher. ROWNUM 4. DELETE h. Additional control structures (1 hour) 1. Exercise ReturningInto. Exercise bulkDemo. LEVEL d. Savepoints . Exercise case. Exercise insert.sql c.sql g. Clause RETURNING n. Roles 5. Object and system privileges b.13.sql o.sql k.sql c. Condition WHERE j.Urman “Oracle 9i PL/SQL programming” (Chapter 4). INSERT d. CASE instruction a. GOTO and labels b. ROWID e. Transactions a. Database link q. SELECT b. Exercise goto. DML in PL/SQL a. Exercise tables. Exercise delete. Using dynamic SQL 2. REVOKE and privileges a. GRANT and REVOKE c.sql 2. Exercise WhereClause.

Declaration of cursor variable 2. time) b. Nomatch. INSTR4 d.sql 3. Advanced features of cursors (2 hours) 1. DUMP 7. Closing cursor variables 6. INSTRB.sql. Opening cursor variable for query 5. Arithmetic operations with date and time 5. ForLoop. INSTRC. Internal SQL functions (2 hours) 1.sql. ТО_NUMBER e. SOUNDEX c. Implicit and explicit cursors 2.Urman “Oracle 9i PL/SQL programming” (Chapter 5). Exercise RefCursors. Self-study using S. c. LENGTH.sql.sql.BUCKET 4. WhileLoop. Transactions and blocks d. SUBSTRC. INSTR.sql 17. TIMESTAMP_TZ 6. NoDataFound. WIDTH. autoSavepoints. NLS functions 3. SUBSTR2.sql 7.sql. ТО_TIMESTAMP. ТО_CHAR (date.Urman “Oracle 9i PL/SQL programming” (Chapter 6). 15.sql 15. Conversion functions a.sql. LENGTH2. ТО_DATE d. consulting teacher. performing corresponding exercises from the book. Memory allocation 4. SUBSTR. ExitWhen. ForUpdate. LENGTHC. Autonomous transactions e.sql. TO_CHAR (number) c. commit. performing corresponding exercises from the book. INSTR2. Cursor variables (1 hour) 1.sql. LENGTHS.sql. autoPragma. LENGTH4 2. Exercises autoTrans.sql. 16. 16. ImplicitFOR. consulting teacher.sql. badFetch. Restrictions for cursor variables . SUBSTRB. cursor2. Exercises SimpleLoop. SUBSTR4 b. Character functions a. ISERENV Day 5. Parametrized.sql.sql 3. Exercises cursor1. Cursor cycles 4. AlreadyOpen.sql. Self-study using S. Exercises CursorLoop.sql.

19. consulting teacher.sql Day 6.sql 9.sql 3.sql. Varying arrays 6. Library. Advanced exception handling (5 hours) 1.sql.sql. Exercises varray.exercise ErrorPkg.sql.Tracking all exceptions 11.sql 13.sql 3. Register. Exceptions in declarations block 7. performing corresponding exercises from the book. Function RAISE_APPLICATION_ERROR 4.sql 7.sql. extend. Multilevel constructions 8. tConstruct. delete. Pragma EXCEPTION INIT 2. performing corresponding exercises from the book.Methods of composite constructions 14. Exercises UserDefined.sql.sql 5. . LibraryOperator.sql 10. performing corresponding exercises from the book.sql. trim. callLibrary.sql. nullTable.Modification of composite constructions elements 12. tables.Exercises exists.sql. PrintRequired. limit.sql 5. Index-by tables 2. Self-study using S. count.sql. Exercise multilevel.sql.sql.Urman “Oracle 9i PL/SQL programming” (Chapter 9).sql. Exceptions in exceptions block 8.sql. Nested tables 4.sql 11.sql 19. varAssign. Scope of exception 9. Exercise OutOfScope.sql.Locating error 12.sql. consulting teacher. 18. Self-study using S.sql. nonSequential. Exceptions in execution block 6. Self-study using S. Exercise indexBy. 18. vAssign. Exercise ExceptionInit.sql.Exercises Library.sql. Construct. tabAssign.Urman “Oracle 9i PL/SQL programming” (Chapter 7). collectionDML. extendDelete.sql.sql.Urman “Oracle 9i PL/SQL programming” (Chapter 8). Stored constructions 10.sql. callLibrary. 17. consulting teacher. Composite constructions (5 hours) 1.Exercises typeLocation. collectionLoops. Exercises nested.

Self-study using S.sql. Additional features of procedures (3 hours) 1.sql. RaiseError.sql.sql. Exercises localSub. Self-study using S. StudentsOps2. callANS. anonymousDependencies. DMLUpdate. ClassInfo. consulting teacher. Exercise Random.sql.sql.sql. Overloading 4.sql.sql. Exercises FullName. ParameterLength. NoCopyTest. Advanced using of procedures (6 hours) 1. 22. Exercises RecordFullClasses. performing corresponding exercises from the book.Urman “Oracle 9i PL/SQL programming” (Chapter 10). DefaultTest.sql. DefaultPragma.sql.sql.sql.sql.sql.sql Day 8. default. objectOverload.sql. CopyFast.sql.sql.sql 5. StudentOps.sql.sql. consulting teacher. Stored procedures 4.sql Day 7.Urman “Oracle 9i PL/SQL programming” (Chapter 9). ClassPackage2. TrustPkg. Extended syntax of procedures and functions 2. callCL. mutual. Instantiation 6. InsertTemp. Self-study using S. Exercises ClassPackage. callMT. calls. Overload. Exercise overload.sql 21.sql. invokers. Allocation of procedures and functions 2.sql.sql. Additional features of packages (2 hours) 1. performing corresponding exercises from the book. 22.sql.sql.sql. localError. ModeTest. PersistPkg2.Urman “Oracle 9i PL/SQL programming” (Chapter 10).sql. forwardDeclaration.sql. Using of stored procedures 2. performing corresponding exercises from the book. 23. noparams. remoteDependencies. consulting teacher.sql. 20. overloadedLocal. callRS.sql 3. localStored. Extended syntax of package 2. PersistPkg.sql.sql. 21.sql.sql. callFunction.sql . Advanced using of procedures (continue) (2 hours) 1.sql.sql.sql. dependencies.sql. CallMe. AlmostFull. packageError. execute.sql 3. Exercises AddNewStudent. 20.sql.sql.

sql. Exercises relTables. consulting teacher.sql.sql Day 10.sql. DBMS_PIPE.sql.2 hours. DBMS_SQL.sql. Advanced features of PL/SQL (8 hours) 1. tables.sql. consulting teacher.sql. pseudoRecords. Native dynamic SQL 2.sql.Urman “Oracle 9i PL/SQL programming” (Chapter 11). Exercise LOB_DML. Object types 6.sql c. Exercises Point. DBMS_ALERT. LogConnects.sql 3.sql e. DatabaseSchema. LimitMajors. ClassesRoomInstead. insteadOf. Online training in MyLearning (Manipulating Large Objects in PL/SQL) .sql 5.sql 9.sql 7. Exercises execImmediate.sql. PointSQL.sql 5. 23.sql. 25. samename. Self-study using S. AlertReceive. GenerateStudentID. mutating. 24.sql. Exercises firingOrder. Self-study using S.sql.Exercise pipelined. exercise dynamicDML. 24. exercise UTL_FILE. 25.sql Day 9.sql. PipeReceive.sql f. exercise DBMS_JOB. UTL_FILE.sql.sql. LogRSChanges. Mutating tables 6. DBMS_JOB.sql. exercises AlertSend. Trigger creation 4. Trigger types 2.Urman “Oracle 9i PL/SQL programming” (Chapter 12). exercise UTL_TCP. LogErrors.Additional packages a. .sql b.sql 11. LogCeations. Large objects 8. performing corresponding exercises from the book. DBMS_LOB. Exercise CascadeRSInsert. Exercises FORALL. Bulk collect 4. Advanced using of triggers (6 hours) 1. Pipelined functions 10.sql. BULK_COLLECT.sql.sql. exercises PipeSend. NativeDynamic.sql d. performing corresponding exercises from the book. UpdateMajorStats. exercise DBMS_LOB. execBind. UTL_TCP.sql g.sql 3.sql.

26. 27. .3 hours. Online training in MyLearning (The SQL* Loader and PL/SQL) - 3 hours. Online training in MyLearning (Oracle-Supplied Packages and DBMS_SCHEDULER) .