dev.rean.me
database

SQL Cheat Sheet — Free Download for Beginner

SQL cheat sheet free download. Learn SQL statement fast — CREATE TABLE, INSERT, SELECT, UPDATE, DELETE and more. Good for beginner who use SQL, MySQL, PostgreSQL, or SQL Server.

2026-08-26 · 5 min read

Share:

SQL Cheat Sheet — Help You Learn SQL Quickly

Hello friend! Today we share SQL Cheat Sheet for free. If you want to learn SQL fast, this cheat sheet is what you need. Save it, print it, use it every day!


SQL Cheat Sheet Free Download

If you want to learn SQL statement fast and work with any database, this SQL cheat sheet help you a lot. It show you all important SQL command in one page. Very useful!

SQL Cheat Sheet from DataCamp

Source: DataCamp

You will learn about:

  • ✅ What is SQL
  • ✅ How to CREATE TABLE — make new table in database
  • ✅ How to INSERT data — put new row into table
  • ✅ How to SELECT data — read data from database
  • ✅ How to UPDATE data — change existing data
  • ✅ How to DELETE data — remove row from table
  • ✅ SQL Data Types — what type for number, text, date
  • ✅ SQL Commands — DDL, DML, DCL and more

SQL Cheat Sheet 2 from sqltutorial.org

Source: sqltutorial.org


Quick SQL Reference

Here some most use SQL command. Good for review when you forget syntax!

SELECT — Read Data

-- Select all column
SELECT * FROM tbStudents;

-- Select specific column
SELECT student_id, student_name FROM tbStudents;

-- Select with condition
SELECT * FROM tbStudents WHERE is_active = 1;

-- Select with sort
SELECT * FROM tbStudents ORDER BY student_name ASC;

INSERT — Add New Data

-- Insert one row
INSERT INTO tbStudents (student_name, email, age)
VALUES ('Rean', 'rean@email.com', 20);

-- Insert many row at once
INSERT INTO tbStudents (student_name, email, age)
VALUES ('Dara', 'dara@email.com', 22),
       ('Sovan', 'sovan@email.com', 21);

UPDATE — Change Existing Data

-- Update one row (always use WHERE!)
UPDATE tbStudents
SET email = 'new@email.com'
WHERE student_id = 1;

-- Update many column same time
UPDATE tbStudents
SET email = 'new@email.com', age = 25
WHERE student_id = 1;

⚠️ Warning: Always put WHERE in UPDATE! If no WHERE → it update ALL row in table. Very dangerous!

DELETE — Remove Data

-- Delete one row (always use WHERE!)
DELETE FROM tbStudents
WHERE student_id = 1;

-- Delete all row (careful!)
DELETE FROM tbStudents;

⚠️ Warning: Same like UPDATE — always use WHERE in DELETE! No WHERE = delete everything!

CREATE TABLE — Make New Table

CREATE TABLE tbStudents (
  student_id   INT PRIMARY KEY,
  student_name VARCHAR(100) NOT NULL,
  email        VARCHAR(150) UNIQUE,
  age          INT,
  is_active    BIT DEFAULT 1
);

Tips for SQL, MySQL, PostgreSQL

💡 General SQL Tip

Tip: Print this cheat sheet and put on your desk. When you forget syntax, look at it. Better than search Google every time!

Tip: Learn SELECT first. Most database job use SELECT 80% of the time. Master SELECT → you already win half the battle.

🐬 MySQL Tip

MySQL Tip: In MySQL, use SHOW TABLES; to see all table in database. Use DESCRIBE tbStudents; to see column and type.

-- See all table
SHOW TABLES;

-- See table structure
DESCRIBE tbStudents;

-- See how table was created
SHOW CREATE TABLE tbStudents;

🐘 PostgreSQL Tip

PostgreSQL Tip: In PostgreSQL, use \dt in psql terminal to see all table. Or use information_schema to query table info.

-- See all table in PostgreSQL
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public';

-- See column info
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'tb_students';

🪟 SQL Server / MSSQL Tip

SQL Server Tip: In SQL Server, use sp_help or sp_columns to see table structure. Very useful!

-- See table structure
EXEC sp_help 'tbStudents';

-- See all table in current database
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE';

Download Image — High Quality

You can download and save image below for offline use or print out:


Summary

  • SQL cheat sheet help you remember important SQL command fast.
  • Most use command: SELECT, INSERT, UPDATE, DELETE, CREATE TABLE
  • Always use WHERE in UPDATE and DELETE — or you will change/delete ALL data!
  • Different database have little different syntax, but basic SQL is same same.

That all friend! Bookmark this page and come back anytime you forget SQL syntax. Happy coding! 🎉


📚 Read More in Database

Want learn more? Check other article in database category:

← Back to database
Share: