Cheat Sheets

SQL Beginner Cheat Sheet: SELECT, INSERT, UPDATE, DELETE & WHERE

By ArpaNeuro Team September 26, 2026
SQL beginner cheat sheet

A beginner SQL cheat sheet is CRUD against one table: SELECT to read, INSERT to add, UPDATE/DELETE to change with a WHERE clause. Practice in phpMyAdmin or the mysql client before you wire PDO. Always filter writes. Always specify columns on insert.

This SQL cheat sheet is written for people searching for a fast, accurate reference: students, junior developers, and teams shipping production software. Pin it, copy the snippets, and come back when syntax slips.

Quick reference

  • SELECT: SELECT id, email FROM users; — read rows.
  • WHERE: WHERE id = 1 or email = "ada@example.com".
  • ORDER BY: ORDER BY id DESC so newest first.
  • LIMIT: LIMIT 10 for a page of results.
  • INSERT: INSERT INTO users (email, name) VALUES ("a@b.c", "Ada");
  • UPDATE: UPDATE users SET name = "Ada Lovelace" WHERE id = 1;
  • DELETE: DELETE FROM users WHERE id = 1; — never skip WHERE while learning on real data.
  • NULL: Missing value. IS NULL / IS NOT NULL.

Copy-paste examples

Create a row, then read it back

Run these one at a time in phpMyAdmin. Quotes are for strings; numbers stay unquoted.

INSERT INTO users (email, name) VALUES ('ada@example.com', 'Ada');
SELECT id, email, name
FROM users
WHERE email = 'ada@example.com';
UPDATE users
SET name = 'Ada Lovelace'
WHERE email = 'ada@example.com';

Common mistakes

  • Updating without WHERE and changing every row.
  • Putting quotes around integers and then wondering about indexes (works often, still sloppy).
  • Learning only a GUI and never reading the SQL it generated.
  • Pasting passwords into a query you later commit to git.

FAQ

  1. Do I need a programming language to use SQL? You can run SQL in a client. Apps use PHP/Python to send SQL safely with parameters.
  1. What is a table? A named grid of rows and columns with types. A database contains many tables.
  1. How do I practice on XAMPP? Start MySQL, open phpMyAdmin, create a database, create a users table, run the statements on this page.

Related SQL cheat sheets

Build with this stack

When a cheat sheet is not enough — you need a production app, a student FYP, or a custom dashboard — ArpaNeuro builds custom web development and also sells ready-made source code. Request a quote and tell us the stack.

Browse software development services or the source code marketplace if you want a working codebase instead of starting from a blank file.

← All Articles Get a Quote →