SQL And PLSQL

Difference between SQL and PL/SQL

SQL
PL/SQL
SQL Stands for Structured Query Language
PL/SQL stands for Programming Language SQL.
SQL is used to execute single query.
PL/SQL is used to execute multiple statements.
SQL tells the database what to do but not how to do. So it is declarative.
PL/SQL tells the database how to do things. So it is procedural.
SQL can be used in PL/SQL programs.
PL/SQL can’t be used in SQL statement.
SQL is used with various database systems like MySQL, SQL Server, Oracle, DB2, etc.
PL/SQL is used only with Oracle database.
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 is used to write queries, DDL and DML statements.
PL/SQL is used to write program blocks, functions, procedures triggers,and packages
An example of SQL query is given below.
SELECT * FROM Customers;
An example of PL/SQL program is given below.
BEGIN
dbms_output.put_line(‘Hello Workd’);



loading...

No comments:

Powered by Blogger.