sqlcmd.net validated sql reference
beginner retrieval MySQL MariaDB SQL Server PostgreSQL SQLite

Select All Rows

Return every row from a table with an explicit sort order for deterministic output.

Docker-validated Not currently validation-green

List all rows in a table

This example keeps the dataset tiny and adds ORDER BY id so the output is deterministic across engines.

Rows loaded before the example query runs.
Setup
CREATE TABLE people (id INT, name VARCHAR(50));

INSERT INTO
  people (id, name)
VALUES
  (1, 'Ada'),
  (2, 'Linus');
Shared across supported engines.
SQL
SELECT
  id,
  name
FROM
  people
ORDER BY
  id;
Returned rows for the shared example.
idname
1Ada
2Linus

Validated on MySQL, MariaDB, SQL Server, and PostgreSQL with identical result shape.

Where this command helps.

  • checking the current contents of a small table
  • building a baseline query before adding filters or joins

What the command is doing.

Use SELECT with ORDER BY when you want a complete, stable result set for teaching or debugging examples.