PRBLEM / DEVELOPER RESOURCES

SQL SELECT with WHERE

← Back to Code Library

SQLBeginner

Retrieve rows matching a condition.

When to use it

Use to filter data without modifying it.

Demo tables (SQLite)
users(id, name, score, active, phone)
orders(id, user_id, total, status)
products(id, name, price)

This is an isolated temporary SQLite database. Any edits disappear after each run. It is not connected to WordPress.

SQL · Editable example
First run downloads a browser engine; internet required. Nothing runs on WordPress.No visitor code executes on the WordPress server.
Edit this example or check its structure. For Python/SQL select Run for real browser-based output.

Expected output

Rows depend on your users table.

Common mistake and fix

Run only against a database where the table exists.

Related concepts: query, filters

Explain this code

Retrieve rows matching a condition.

Educational examples are not a substitute for a real compiler or version-specific documentation. JavaScript, Python and SQLite demos run in isolated browser contexts when supported; Python and SQL load an online WebAssembly runtime on first use. Other languages receive structural hints, not compiler validation. No visitor code executes on WordPress.