1.

State the advantages of PL/SQL?

Answer»

PL/SQL is an extension for SQL and Oracle. It enhances the CAPABILITIES of SQL. Therefore, with every release of the Oracle Database, the feature and functionalities of PL/SQL is enhanced. It is strongly integrated with SQL and supports both static and dynamic SQL.  

The following are the advantages of PL/SQL:

  • Static and Dynamic SQL

PL/SQL has both static and dynamic SQL. Static SQL with DML operations and transaction control from PL/SQL block. SQL allows embedding DDL statements in PL/SQL blocks in Dynamic SQL.

  • Exception Handling

PL/SQL has exception handling that helps in EASIER debugging.

  • For Programmers

PL/SQL allows faster update of database. Therefore, beneficial for programmers.

  • Faster Execution

With PL/SQL, we can easily perform faster execution of queries.

  • Block of Statements

PL/SQL executes as a whole block i.e. sends entire block of statements to the database at once.

  • Extension of SQL

Since PL/SQL is an extension of SQL, you get access to predefined SQL packages.

  • Triggers

PL/SQL also comes with the functionality of Triggers. Triggers are stored in a database and fired when some event occurs. The event here can be a Database Manipulation statement i.e. DELETE, INSERT, or UPDATE, or a Database Definition statement (CREATE, ALTER, or DROP).

  • Optimal Efficiency

PL/SQL and SQL brings optimal efficiency since it runs within the same server process.

  • Error Management

Error Management in PL/SQL brings in internally defined, predefined, and user-define exceptions and process to handle them with error codes and messages. With that, PL/SQL also has RAISE statement for your own defined exceptions.



Discussion

No Comment Found