DML
Abbreviation: Data manipulation language
DML is used to insert, update, delete and select records from a table.
DML Statements change the data in the database but does not effect the structure of the objects.
DML Statements are transaction controlled, they can be committed or rolled back in a transaction.
What can DDL Statements Do?
Following are the DML Statements:
- Select
- Insert
- Update
- Delete
Example:
SELECT * FROM EMPLOYEE
The above query gives the result set which contains all the records in the table
INSERT INTO EMPLOYEE VALUES (3,’Ram’)
The above query inserts one record into employee table, employee number as 3 and name as Ram.
UPDATE EMPLOYEE SETNAME = ‘PAUL’ WHERE EMPLOYEEID = 2
The above query updates the employee name of the employee with employee id as 3 to PAUL