PL/SQL PL/SQL stands for Procedural Language extensions to the Structured Query Language (SQL). PL/SQL can execute a number of queries in one block using single command. One can create a PL/SQL unit such as procedures, functions, packages, triggers, and types, which are stored in the database for reuse by applications. The PL/SQL engine resides in the Oracle engine. The Oracle engine can process not only single SQL statement but also block of many statements. Structure of PL/SQL Block: DECLARE declaration statements; BEGIN executable statements EXCEPTIONS exception handling statements END; / Example : SET SERVEROUTPUT ON; SQL> DECLARE var varchar2(40) := 'I love GeeksForGeeks' ; BEGIN dbms_output.put_line(var); END; / PL/SQL Functions PL/SQL functions are reusable blocks of code that can be used to perform specific tasks. They are...
Comments
Post a Comment