Python & SQL BibleChapter 232
CRUD Operations
Section 1 of 2-~ 12 min read-Synced from Cuantum content
- Insert into a table
INSERT INTO table_name (column1, column2) VALUES ('value1', 'value2');- Update a table
UPDATE table_name SET column1 = 'new_value' WHERE condition;- Delete from a table
DELETE FROM table_name WHERE condition;- Create a table
CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype);- Drop a table
DROP TABLE table_name;- Alter a table
ALTER TABLE table_nameADD column_name datatype;This cheat sheet covers the basics of SQL, providing an overview of common SQL operations. It doesn't cover all aspects of SQL, but it's a good starting point for most tasks.