80 likes | 235 Views
Lecture-5. 4. PL/SQL allows declaration and use of variables in blocks of code. These variables can be used to store intermediate results of a query for later processing, or calculate values and insert them into an Oracle table later.
E N D
4. PL/SQL allows declaration and use of variables in blocks of code. These variables can be used to store intermediate results of a query for later processing, or calculate values and insert them into an Oracle table later. 5. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without the use of the Oracle engine. DECLARE Declaration of memory variables, constants, cursors, etc. in PL/SQL BEGIN SQL executable statements PL/SQL executable statements EXCEPTION SQL or PL/SQL code to handle errors that may arise during the execution of the code END;
Oracle Engine PL/SQL block of code DECLARE Procedural Statements, BEGIN Procedural Statements, SQL statements; EXCEPTIONS SQL statements; END; PL/SQL Engine SQL Statement Executor