Menu

Contact US

[email protected]

Data Definition Language (DDL) SQL commands like CREATE, ALTER, TRUNCATE, and RENAME are considered part of the Data Definition Language (DDL). There are lots of SQL commands, so grouping them into different categories is helpful when learning about managing databases. DDL commands are used to define, configure, and remove data structures, like tables, views, schema, indexes, and the database itself. You typically do not run DDL commands to work directly with data. Instead, use these commands perform required actions at the table level or higher. DDL commands have great impact, especially when considering the power of the DROP command.

DROP TABLE READING
DROP DATABASE brainjammer

Remember from Exercise 2.1 where you created an Azure SQL database. If you execute those DROP commands, the referenced table and database will be deleted. Unlike when you are working in Windows, you are not asked to confirm if you really want to delete the database. If you execute the command, the database is deleted without question. There are many reasons to perform backups of your database; this is one such example. Here are a few other DDL SQL commands that may be useful.