Data Manipulation Language (DML)
INSERT Statement
Section titled “INSERT Statement”Single Row
Section titled “Single Row”INSERT INTO table_name (column1, column2, ...)VALUES (value1, value2, ...);Multiple Rows
Section titled “Multiple Rows”INSERT INTO table_name (column1, column2, ...)VALUES (value1a, value2a, ...), (value1b, value2b, ...);UPDATE Statement
Section titled “UPDATE Statement”UPDATE table_nameSET column1 = value1, column2 = value2, ...WHERE condition;DELETE Statement
Section titled “DELETE Statement”DELETE FROM table_nameWHERE condition;Examples
Section titled “Examples”Insert Employee
Section titled “Insert Employee”INSERT INTO employees (employee_id, first_name, last_name, email)VALUES (1, 'John', 'Doe', 'john.doe@company.com');Update Salary
Section titled “Update Salary”UPDATE employeesSET salary = 75000WHERE employee_id = 1;Delete Employee
Section titled “Delete Employee”DELETE FROM employeesWHERE employee_id = 1;Best Practices
Section titled “Best Practices”- Always use WHERE clause with UPDATE/DELETE
- Test with SELECT before UPDATE/DELETE
- Use transactions for critical operations
- Backup data before major changes