Beginner

710. UPDATE

Learn how to modify existing records in a database table using the UPDATE statement.

📘 Lesson 709 of 728 ⏱ 7 min 🎯 Beginner

UPDATE is a Data Manipulation Language (DML) command used to modify existing data in one or more rows of a table. If a WHERE clause is not specified, every row in the table is updated.

Business data changes regularly. Employees receive promotions, customers update their contact details, products change prices, and inventory levels are adjusted. UPDATE allows these changes without recreating the data.

The HR department increases the salary of an employee after a promotion by updating the Salary column.

SQL
UPDATE Employees
SET Salary = 70000
WHERE EmployeeID = 101;

UPDATE is used in banking systems, HR software, inventory management, CRM applications, hospital systems, and e-commerce platforms to keep business information accurate.

  • Modifies existing records.
  • It is a DML command.
  • Can update one or multiple rows.
  • Usually combined with WHERE.
  • Can update multiple columns.
  • Supports expressions and calculations.
  • Always verify affected rows before execution.
Which SQL statement modifies existing records?

The UPDATE statement is used to modify existing records in a table.

What happens if UPDATE is executed without a WHERE clause?

Every row in the table is updated.

Have you finished this lesson?

Introduction to SQL – All Lessons