Friends,

As we know, Oracle is combination of both SQL and PL/SQL. To become an Oracle DBA, one probably needs to learn both of them. Still, there are some points that differentiate both these languages.

Let’s have a look…

Difference between SQL and PL/SQL:-

SQL is a Structured Query Language used to issue a single query or execute a single insert/update/delete.

PL-SQL is a  programming language SQL, used to write full programs using variables, loops,operators etc. to carry out multiple selects/inserts/updates/deletes.

SQL may be considered as the source of data for our reports, web pages and screens.

PL/SQL can be considered as the application language similar to  Java or PHP. It might be the language used to build, format and display those reports, web pages and screens.

SQL is a data oriented language used to select and manipulate sets of data.
PL/SQL is a procedural language used to create applications.

SQL vs. PL-SQL

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

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

SQL is declarative, i.e., it tells the database what to do but not how to do it.
Whereas, PL/SQL is procedural, i.e., it tells the database how to do things.

SQL can be embedded within a PL/SQL program.
But PL/SQL can’t be embedded within a SQL statement.

I Hope this article may useful to you 🙂 Stay Tuned for more differences and other stuff.