Syntax

SQL Update Rows Syntax

In SQL, update rows: changes values in existing rows — UPDATE users SET active = false WHERE id = 7;

Quick Answer

Syntax
UPDATE users SET active = false WHERE id = 7;
SQLSyntax

Update Rows

Code example
UPDATE users SET active = false WHERE id = 7;

Changes values in existing rows.

Tip: Always include WHERE, or every row is updated.

Learn More

How to update rows in SQL

  1. Open your SQL file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Tip: Always include WHERE, or every row is updated.

SQL Update Rows Syntax

Use UPDATE users SET active = false WHERE id = 7;.

Related Syntax References

Frequently asked questions

What is the SQL syntax for update rows?

Use this pattern: UPDATE users SET active = false WHERE id = 7;

Can I copy this SQL code example?

Yes. Use Copy code and adapt the example to your program.

Is this SQL syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify