The Structured Query Language (SQL) is a language used to manage data held in relational databases.
This tool allows you to create a relational database and query it using SQL.
The database does not persist data between sessions.
1
DROP TABLE IF EXISTS books;3
CREATE TABLE books(id INT, name TEXT, author TEXT, year INT);5
INSERT INTO books VALUES (1,'The Lord of the Rings','J.R.R. Tolkien',1954);6
INSERT INTO books VALUES (2,'The Hobbit','J.R.R. Tolkien',1937);7
INSERT INTO books VALUES (3,'Harry Potter and the Philosopher''s Stone','J.K. Rowling',1997);8
INSERT INTO books VALUES (4,'Harry Potter and the Chamber of Secrets','J.K. Rowling',1998);10
SELECT * FROM books ORDER BY year;12
SELECT * FROM books WHERE author = 'J.R.R. Tolkien';The SQL query to execute.
Click Execute to run SQL.