As a result, one must
always supplement knowledge of standard SQL with information specific to the database vendor one is using.
The desktop reference SQL in a Nutshell by Kevin Kline (2004) finds it necessary, for example, to include
separate sections for ANSI Standard, DB2 (IBM), MySQL (open source), Oracle, and SQL Server (Microsoft)
varieties of the standard.
SQL statements are often distinguished as being part of the data definition language (DDL) or the data
manipulation language (DML). DDL statements create database structures like tables, views, triggers, and
procedures. DML statements insert data, update data, retrieve data, or delete data in the database.
SQL is not case sensitive. Commands and names may be entered in uppercase or lowercase. However,
some people have a style preference for using uppercase and lowercase letters to segregate SQL key words from
database names.
DDL??”DATA DEFINITION LANGUAGE
The first DDL statement to learn is CREATE. The CREATE TABLE command is the means by which to
create a relation. In SQL, a relation is called a table, a tuple is called a row, and an attribute is called a column.
Here is the syntax for the CREATE TABLE statement:
CREATE TABLE
(
[, ]
[CONSTRAINT []
[,CONSTRAINT [] ]]
);
This syntax specification says that the statement must begin with CREATE TABLE followed by your choice of
table name (shown between the less-than and greater-than brackets).
Pages:
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413