What is DDL
DDL stands for Data Definition Language. DDL is a set of SQL commands that are used to define and modify the structure of database objects.
DDL impacts on the creation and maintenance of tables, schemas and indexes.
Key commands in DDL
- Create - is used to create new database objects such as tables, views and index.
2.Alter table - Changes the structure of an existing database object by adding, removing or changing columns and constraints.
3.Drop - Deletes a database object permanently
4.Truncate- deletes all rows of data from a table
What is DML
DML Stands for Data Manipulation Language. DML is used to interact with and modify the data stored inside tables.
Key commands of DML
1.Insert - add new records in a database table.
2.Update - updates existing records in a database table.
3.Delete - removes rows in a database table
4.Select - displays one or more tables in a database.
Conclusion
DDL defines the structure of your database while DML manages the data inside that structure.








Top comments (0)