simple-queries
CREATE Query
CREATE TABLE employees (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
age INT
);Creates a new table named
employeeswith columnsid,name, andage.
SELECT Query
SELECT * FROM employees;Retrieves all columns and rows from the
employeestable.
INSERT Query
INSERT INTO employees (name, age) VALUES ('John Doe', 30);UPDATE Query
UPDATE employees SET age = 35 WHERE name = 'John Doe';Modifies the
ageof the employee named 'John Doe' to 35.
DELETE Query
DELETE FROM employees WHERE name = 'John Doe';Deletes the employee named 'John Doe' from the
employeestable.
Last updated