Posts

Showing posts from December 9, 2020

What is Data definition language?

Image
Data Definition Language (DDL) in SQL What is Data Definition Language (DDL)? Data Definition Language (DDL) is a set of SQL commands used to define, create, modify, and delete database structures . DDL commands are responsible for managing database objects such as: Tables Indexes Views Schemas Users (in some database systems) DDL is an important subset of SQL (Structured Query Language) used in database applications. Common DDL Commands Some commonly used DDL commands include: 1. CREATE The CREATE command is used to create new database objects , such as tables or indexes. Example: CREATE TABLE Students (     StudentID INT,     Name VARCHAR(50),     Age INT ); This command creates a new table named Students with specified columns. 2. ALTER The ALTER command is used to modify an existing database object , such as adding or changing columns in a table. Example: ALTER TABLE Students ADD Email VARCHAR(100); This command creates a n...