Difference Between SQL & PLSQL
SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database whereas PL/SQL is a combination of SQL along with the procedural features of programming languages.
What is PL/SQL
The PL/SQL stands for "Procedural Language extensions to Structured Query Language" and is the advanced version of SQL to perform more complex queries/operations on DB.
BEGIN DBMS_OUTPUT.PUT_LINE('Hello World!'); END;
What is SQL
Structure Query Language(SQL) is a database query language used for storing and managing data in Relational DBMS. The language was developed by IBM in 1970. It represents the set of relations (tables) in the database using DDL i.e. Data Definition Language.
SELECT COUNT(DISTINCT Country) FROM Customers;
Tablename Records Customers 91 Categories 8 Employees 10 OrderDetails 518 Orders 196 Products 77 Shippers 3 Suppliers 29
|Structured Query Language||Procedural Query Language|
|Has no variables||Has many variables & data types|
|Executes single query at time||Execute block-wise|
|No loop and if control||Have loop, while and if controls|
|Declarative Language||Procedural Langauge|
|Interacts with the database directly||Doesn't interact with server directly|
SQL is a declarative language that specifies what data is needed. On the other hand, PL/SQL is a procedural language that specifies how data can be retrieved and what information is required.