Syntax

SQL Filter Rows with WHERE Syntax

In SQL, filter rows with where: returns only rows matching a condition — SELECT * FROM users WHERE age > 30;

Quick Answer

Syntax
SELECT * FROM users WHERE age > 30;
SQLSyntax

Filter Rows with WHERE

Code example
SELECT * FROM users WHERE age > 30;

Returns only rows matching a condition.

Learn More

How to filter rows with where in SQL

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

SQL Filter Rows with WHERE Syntax

Use SELECT * FROM users WHERE age > 30;.

Related Syntax References

Frequently asked questions

What is the SQL syntax for filter rows with where?

Use this pattern: SELECT * FROM users WHERE age > 30;

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