You've learned this already. ✅
Click here to view the next lesson.
Chapter 23 - Appendix D: SQL Cheat Sheet
CRUD Operations
- 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_name
ADD 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.
CRUD Operations
- 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_name
ADD 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.
CRUD Operations
- 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_name
ADD 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.
CRUD Operations
- 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_name
ADD 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.