Refinance now before rates go up! Get multiple rate quotes at GetMyLender.com.

Difference Between SQL And PL/SQL

SQL pronounced as a sequal which is stands for Structured Query Language. With the help of SQL, you can view data using Data Definition Language (DDL) Commands as well as manipulate data using Data Manipulation Language (DML) Commands.

PL/SQL stands for Procedural Language/Structured Query Language. It is the Oracle’s procedural extension of SQL, is an advanced fourth-generation programming language (4GL). It offers software-engineering features such as data encapsulation, overloading, collection types, exceptions, and information hiding. PL/SQL also supports rapid prototyping and development through tight integration with SQL and the Oracle database.

1) SQL is a data oriented language for selecting and manipulating sets of data. PL/SQL is a procedural language to create applications.

2) SQL is executed one statement at a time. PL/SQL is executed as a block of code.

3) SQL is a query based language where as PL/SQL is a programming based language.

4) SQL is used to code queries, DML and DDL statements. PL/SQL is used to code program blocks, triggers, functions, procedures and packages.

5) SQL used to issue a single query or execute a single insert/update/delete. PL/SQL used to write full programs using variables, loops, operators etc. to carry out multiple selects/inserts/updates/deletes.

6) We can embed SQL in a PL/SQL program, but we cannot embed PL/SQL within a SQL statement.

7) Unlike SQL, PL/SQL has the exception handling facility.

8) SQL tells the database what to do (declarative), not how to do it. In contrast, PL/SQL tells the database how to do things (procedural).

9) SQL is a language that is used by relational database technologies such as Oracle, Microsoft Access, and Sybase etc., PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database.


Sr.No. SQL PL/SQL
1. SQL is a data oriented language for selecting and manipulating sets of data. PL/SQL is a procedural language to create applications.
2. SQL is executed one statement at a time. PL/SQL is executed as a block of code.
3. SQL is a query based language. PL/SQL is a programming based language.
4. SQL is used to code queries, DML and DDL statements. PL/SQL is used to code program blocks, triggers, functions, procedures and packages.
5. SQL used to issue a single query or execute a single insert/update/delete. PL/SQL used to write full programs using variables, loops, operators etc. to carry out multiple selects/inserts/updates/deletes.
6. We can embed SQL in a PL/SQL program. We cannot embed PL/SQL within a SQL statement.
7. SQL has not the exception handling facility. PL/SQL has the exception handling facility.
8. SQL tells the database what to do (declarative), not how to do it. PL/SQL tells the database how to do things (procedural).
9. SQL is a language that is used by relational database technologies such as Oracle, Microsoft Access, and Sybase etc. PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database.

No comments:

Post a Comment