Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL, SQL PLUS, PL/SQL
On Tue, 22 Aug 2000 07:01:48 -0800, Al Rusnak wrote:
>I was recently asked, what is the difference between SQL, SQL Plus and
>PL/SQL. I admit it ... I choked !!
>Where can I find a good definition of each??
Look on page 1 of my book, SQL*Plus: The Definitive Guide.=20
Here's the short explanation:
SQL =3D A query language that the database understands. This includes DML statements such as UPDATE, DELETE, SELECT, and so forth. It also includes DDL statements such as CREATE, ALTER, and DROP.=20
PL/SQL =3D Oracle's proprietary procedural language extensions to SQL. PL/SQL is a programming language that runs within the database engine, and within several other Oracle products. Architecturally, according to every diagram that I've ever seen, the PL/SQL engine is a separate box from the SQL engine (and also from the Java engine).
SQL*Plus =3D A tool that allows you to interact with an Oracle database. From the SQL*Plus command prompt, you can submit SQL statements and PL/SQL blocks for the database to execute. SQL*Plus also implements a set of commands that are interpreted and executed within SQL*Plus, not the database. These SQL*Plus specific commands include DESCRIBE, CONNECT, and SET. Some SQL*Plus commands result in SQL statements (DESCRIBE) and PL/SQL blocks (SET SERVEROUTPUT) being submitted to the database. What muddies the water and confuses the issue for people is that SQL statements, PL/SQL blocks, and SQL*Plus commands are all entered from the same prompt.=20
Hope this helps.
Jonathan