What is SQL? SQL is composed of DML and DDL.

DML are the keywords you use to access and manip ulate data, hence the name Data Manipulation Language. DDL are the keywords you use to create objects such as views, tables and procedures, hence the name Data Definition Language. Examples of DML are SELECT, UPDATE, INSERT, MERGE, DELETE, etc. Examples of DDL are CREATE TABLE, ALTER VIEW, CREATE OR REPLACE PROCEDURE, etc.

What are SQL Commands? SQL commands are commands that aren't actually a part of the SQL standard but ar e supported by the tools that support SQL. For example, SQL*Plus has been around a long time and many tools that allow scripting also allow SQL*Plus commands. W hen someone asks me about a SQL command, I first clarify if the mean a SQL keywo rd or a SQL*Plus (or some other tool) command. SQL commands are usually meant NT or they are meant to create SAVE. There are also commands T, COPY. And there is at least What is PL/SQL? The quick answer is from the PL/SQL User Guide: PL/SQL, Oracle's procedural extension of SQL, is an advanced fourth-generation p rogramming language (4GL). It offers software-engineering features such as data encapsulation, overloading, collection types, exceptions, and information hiding . PL/SQL also supports rapid prototyping and development through tight integrati on with SQL and the Oracle database. But what does that mean? The key here are the words: procedural extension of SQL . PL/SQL is a procedural language like C++, Java, ADA, etc. If has variables and variable declarations, conditional controls like IF and CASE. It has looping st ructures such as LOOP, FOR LOOP and the WHILE LOOP. PL/SQL uses SQL to use, mani pulate and save data to the database. If I wanted to create my own, very short, definition of PL/SQL it would be this: PL/SQL is the Oracle native programming language that provides database-centric application development. It can natively call static SQL and provides multiple methods of calling dynamic SQL. So when you hear someone refer to a SQL command, first ask if they really mean S QL or if they mean the SQL tool they are using. And now the answer to the main question: what is the difference between SQL and PL/SQL? SQL is a data oriented language for selecting and manipulating sets of d ata. PL/SQL is a procedural language to create applications. You don't normally have a "SQL application". You normally have an application that uses SQL and a r elational database on the back-end. PL/SQL can be the application language just like Java or PHP can. SQL may be the source of data for your screens, web pages and reports. PL/SQL might be the language you use to build, format and display t hose screens, web pages and reports. to help format output: BREAK, BTITLE, COLUMN, PRI or store data or scripts: COMPUTE, DEFINE, STORE, that interact with the database: SHUTDOWN, CONNEC one that interacts with data: XQUERY.

The code that creates stored database objects is SQL DDL.Think of it like this: The code that makes your program function is PL/SQL. . The commands that format the output of a tool are not related to the SQL standard or to PL/SQL. DDL compiles the code that is written in PL/SQL. The code that manipulates the data is SQL DML. PL/SQL may call SQL to perform data manipulation.

Sign up to vote on this title
UsefulNot useful