Difference Between SQL and PL/SQL



SQL, Structural Query Language is a standard database language which is used create, maintain and retrieve the relational database whereas PL/SQL, Procedural Language extension to SQL, it extends SQL and provide it procedural capabilities.

Following are the important differences between SQL and PL/SQL.

Sr. No. Key SQL PL/SQL
1 Definition SQL, is Structural Query Language for database. PL/SQL is a programming language using SQL for a database.
2 Variables SQL has no variables. PL/SQL has variables, data types etc.
3 Control Structures SQL has no FOR loop, if control and similar structures. PL/SQL has FOR loop, while loop, if controls and other similar structures.
4 Operations SQL can execute a single operation at a time. PL/SQL can perform multiple operation at a time.
5 Language Type SQL is a declarative language. PL/SQL is a procedural language.
6 Embedded SQL can be embedded in a PL/SQL block. PL/SQL can also be embedded in SQL code.
6 Interaction SQL directly interacts with database server. PL/SQL does not directly interacts with database server.
7 Orientation SQL is data oriented language. PL/SQL is application oriented language.
8 Objective SQL is used to write queries, create and execute DDL and DML statments. PL/SQL is used to write program blocks, functions, procedures, triggers and packages.
Updated on: 2019-11-27T07:32:03+05:30

15K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements