SQL – Data Definition Language
Data definition language (DDL) is concerned with the definition of data in SQL. It allows you to create, modify and delete the database objects like database, tables, views, indexes etc.
DDL commands are divided into three categories of commands namely:
Let’s understand these from implementation point of view.
Database DDL commands
- CREATE DATABASE
Before doing any operation in RDBMS, we have to create a database.Let’s say we want to create a School database. The syntax to create database is:
CREATE DATABASE School;
It will create a database named School . The database name should be unique.
- DROP DATABASE
Sometime situation so arises that we need to delete a database from the system. To delete a database completely, DROP command is used.
If we want to delete School database, we need to use following command:
DROP DATABASE School;