dml in dbms code example
Example 1: dml commands
CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,....]);
Example 2: dml commands
Create database university;
Create table students;
Create view for_students;
Example 3: difference between data definition language and data manipulation language
DDL
1-It stands for Data Definition Language.
2-It is used to create database schema and can
be used to define some constraints as well.
3-It basically defines the column (Attributes) of the table.
4-It doesn’t have any further classification.
5-Basic command present in DDL are CREATE, DROP, RENAME, ALTER etc.
6-DDL does not use WHERE clause in its statement.
DML
1-It stands for Data Manipulation Language.
2-It is used to add, retrieve or update the data.
3-It add or update the row of the table. These rows are called as tuple.
4-It is further classified into Procedural and Non-Procedural DML.
5-BASIC command present in DML are UPDATE, INSERT, MERGE etc.
6-While DML uses WHERE clause in its statement.