Junior — Middle
What is the role of DDL commands when working with a database?
sobes.tech AI
Answer from AI
DDL (Data Definition Language) is a subset of SQL commands used to define and modify the structure of a database. The main role of DDL commands is to create, modify, and delete database objects such as tables, indexes, schemas, etc.
Examples of DDL commands:
CREATE— creating tables, databases, and other objects.ALTER— modifying the structure of existing objects (e.g., adding a column to a table).DROP— deleting objects from the database.
Thus, DDL manages the database schema, not the data inside it.