Oct 16, 2024
UPDATE
keyword.employees
).SET
to specify the column to update.
SET hourly_pay = 10.25
for employee.WHERE
clause to specify the row to update.
WHERE employee_id = 6
to select Sheldon Plankton.SET hourly_pay = 10.50, hire_date = '2023-01-07'
.NULL
.
SET hire_date = NULL
to make hire date empty.WHERE
clause to update all rows.
SET hourly_pay = 10.25
affects all employees.DELETE FROM
followed by table name.WHERE
clause to prevent deleting all rows.
DELETE FROM employees WHERE employee_id = 6
.WHERE
clause will delete every record in the table.WHERE
unless intended.WHERE
clauses to specify updates and deletions, avoid accidental mass changes.