DDL (Data Definition Language)
It is used to define the structure of the database schema, including creating, altering, and dropping schema objects like tables, views, indexes, and users.
CREATE
Creates a new database object.
Syntax
Example
ALTER
Modifies the structure of an existing database object.
Syntax
Example
DROP
Removes a database object from the schema.
Syntax
Example
TRUNCATE
Removes all rows from a table, but preserves the table structure. This is a faster alternative to DROP and then CREATE, but cannot be rolled back.
Syntax
Example
COMMENT
Adds a comment to a database object to provide descriptive information
Syntax
Example
RENAME
Renames a database object.
Syntax
Example
Last updated
Was this helpful?