SQL Syntax Examples
Copy these snippets into the Playground to test them out.
SELECT Data
Retrieve data from a table.
SELECT name, price FROM products; SELECT * FROM customers WHERE city = 'New York';
INSERT Data
Add new rows to a table.
INSERT INTO products (id, name, price) VALUES (99, 'Tablet', 299.00);
UPDATE Data
Modify existing records.
UPDATE products SET price = 250.00 WHERE id = 99;
DELETE Data
Remove records from a table.
DELETE FROM products WHERE id = 99;
Aggregates
Perform calculations on data.
SELECT COUNT(*) FROM orders; SELECT AVG(price) FROM products;