Difference between SQL and PL/SQL

MySQLPL/SQLDatabase

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.KeySQLPL/SQL
1DefinitionSQL, is Structural Query Language for database.PL/SQL is a programming language using SQL for a database.
2VariablesSQL has no variables.PL/SQL has variables, data types etc.
3Control StructuresSQL has no FOR loop, if control and similar structures.PL/SQL has FOR loop, while loop, if controls and other similar structures.
4OperationsSQL can execute a single operation at a time.PL/SQL can perform multiple operation at a time.
5Language TypeSQL is a declarative language.PL/SQL is a procedural language.
6EmbeddedSQL can be embedded in a PL/SQL block.PL/SQL can also be embedded in SQL code.
6InteractionSQL directly interacts with database server.PL/SQL does not directly interacts with database server.
7OrientationSQL is data oriented language.PL/SQL is application oriented language.
8ObjectiveSQL 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.
raja
Published on 27-Nov-2019 12:00:46
Advertisements