1.

PL/SQL vs 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 AVAILABLE in Oracle Database since version 6. However, PL/SQL is ALSO available in TimesTen in-memory database since version 11.2.1 and IBM DB2 since version 9.7.

SQL is a domain-specific language used in programming. It is a Structured Query Language for database creation, deletion, fetching rows, modifying rows, etc. relational database management system

The following are the differences:

Basis
PL/SQL
SQL
Embed
Can have SQL embedded in it.
Cannot have PL/SQL code embedded in it.
Interaction with database server
There is no interaction with the database server.
Interaction with the database server.
How/What
PL/SQL defines how it needs to be done.
Defines what needs to be done.
Writing program/functions/procedures
PL/SQL is used to write program blocks,
functions, procedures TRIGGERS, etc.
SQL is used to write queries, DDL and DML statements.
Execution
Executes as a whole block.
Issue a SINGLE query or execute a single insert/update/delete. Executes one statement at a time.


Discussion

No Comment Found