DDL or Data Definition Language statements are a set of three simple but powerful and effective commands: CREATE
, ALTER
, and DROP
. When you look at those words they do not provide you with enough information about what they are capable of doing. In a nutshell, you can do the following:
CREATE
: This statement will create anything from the server, down to the database level of objects (database, tables, views, stored procedures, triggers, users, encryption keys, and so on)ALTER
: This gives you the option to modify any kind of object including server configuration and the database itselfDROP
: This is a dangerous but effective statement for deleting (dropping is the database term) server and database level of objects
As an example, the basic syntax for creating a new table looks like this:
CREATE TABLE [table name] ( [column definitions] ) [list of parameters]