PostgreSQL
Practice SQL online for free on PostgreSQL
Real PostgreSQL exercises with prompts, sample data, and table diagrams — sign in to run and submit.

Frequently asked questions
What is this online SQL practice?
SQL lab is a set of exercises on real PostgreSQL. Pick SELECT, INSERT, UPDATE, DELETE, CREATE, or the other structure commands. Each one has a prompt, sample rows, and a table diagram. Answers are graded by the result set, not by how the SQL is written.
Can I practice without signing in?
You can read the prompt, sample data, and table diagram. Run, Submit, and Hint turn on after you sign in.
Which SQL topics are covered?
SELECT across several domains. Also INSERT, UPDATE, DELETE, ON CONFLICT, TRUNCATE, CREATE TABLE, ALTER TABLE, DROP TABLE, INDEX, and VIEW.
Learn Java on a path — SQL Lab is practice
Run real SQL on PostgreSQL. When you are ready, follow the backend path with labs, quizzes, and code review.