SET

SQL SET Keyword

The SET command is used with the UPDATE statement to specify which columns should be updated and what new values they should receive.

Note: Be careful when using UPDATE without a WHERE clause — it will update all records in the table.

Tutorials dojo strip

SQL SET Syntax

SQL

SQL SET with Specific Row Example

This query updates the city and specialty of the doctor with doctor_id = 1.

SQL

SQL SET with Multiple Rows Example

This query updates the gender field to ‘Unknown’ for all patients whose last name is ‘Smith’.

SQL

SQL SET Labs

Tutorials dojo strip