Wednesday, May 28, 2008

Data Definition Language (DDL) - SQL Databases

The DDL part of SQL means that SQL creates databases and puts parameters on information. You don't want to have information such as "John Smith" "19" and "Level 5" floating around without definitions - your programs wouldn't know what to do with the information, and they wouldn't know what's what! DDL involves creating, modifying, or deleting tables.

CREATE TABLE - creates a new table
ALTER TABLE - changes things in an old table
DROP TABLE - deletes an entire table (and the data) from the database
CREATE INDEX - creates a search key (index) which you can use in SELECT and other statements
DROP INDEX - removes a search key (index)

No comments: