In SQL, the Data Definition Language (DDL) is a subset of SQL. It is used to define and manage the structure of a database in which it includes commands for creating, altering, and dropping database objects such as tables, views, indexes, and constraints. It defines the blueprint of a database and utilizes creation, modification, and management according to the desired structure.
CREATE: This command creates a new table with specified columns and data types using the CREATE TABLE statement.
ALTER: This command enables modification of the structure of existing database objects.
DROP: is used to remove existing database objects. Permanently deletes the specified objects and their associated data.
TRUNCATE: is used to remove all records/rows from a table while keeping the table structure intact.
COMMENT: This command allows users to add comments or descriptions to the data dictionary. Comments can provide additional context or documentation for database objects, aiding in understanding and maintenance.
No comments:
Post a Comment