Java Tutorial - Java Script :
SQL
Most relational database products available today use a standardized language for manipulating the data within a database. This language is known as the Structured Query Language, or SQL (often pronounced as “sequel”). Although the SQL language is standardized, most implementations conform only to a subset of the complete standard language known as SQL-2 Entry Level. The subset serves as a least common denominator between most database products. The databases then create their own extension beyond this standardized subset. In practice, this means that each dialect of SQL is slightly different, although the basic syntax remains the same There are three primary parts to SQL:
DDL: Data Definition Language
DML: Data Manipulation Language
DCL: Data Control Language
The DDL provides commands that are used to create, modify, and remove tables in the database. Some typical DDL commands include:
CREATE TABLE : Creates a new table in the database
ALTER TABLE: Makes changes to an existing database table
DROP TABLE: Removes a table from the database
The DML provides commands to retrieve records, insert new records, and change and delete existing records within the tables of a database. Typical
DML commands include:
SELECT: Selects rows of data for viewing or processing
INSERT: Inserts new rows of data into a table
UPDATE: Modifies existing rows of data
DELETE: Deletes rows of data from a table
The DCL provides commands that control access to the database or data within the database. Typical DCL commands are:
CONNECT: Makes a connection to a database
GRANT: Gives access privileges to database users
REVOKE: Removes user access privileges
The commands listed above are just a representative set of commands from each group. The actual commands available will vary from database product to database product. The syntax for these commands also varies somewhat from database to database. We recommend that you become familiar with the specific dialect of SQL required for the target database. JDBC helps to isolate some differences between dialects. JDBC drivers convert SQL statements made in the JDBC-supported subset into the dialect supported by the target database.
