Aug 10, 2024
CREATE DATABASE db_name;
SELECT * FROM table_name;
UPDATE table_name SET column_name = value WHERE condition;
DELETE FROM table_name WHERE condition;
SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column;
SELECT * FROM table1 LEFT JOIN table2 ON table1.column = table2.column;
SELECT * FROM table1 RIGHT JOIN table2 ON table1.column = table2.column;
SELECT * FROM table1 FULL JOIN table2 ON table1.column = table2.column;
SELECT * FROM table1 WHERE column IN (SELECT column FROM table2);
CREATE VIEW view_name AS SELECT column1, column2 FROM table_name;