← Lesson
BitWithBite
SQL · Quick Reference

Lesson 1 — Introduction to SQL & Databases Cheat Sheet

SQL
In one line: A database is an organized collection of structured data stored electronically. Unlike a spreadsheet, a database can store millions of rows efficiently and let multiple users qu...

Key Ideas

1What is a Database?. A database is an organized collection of structured data stored electronically. Unlike a spreadsheet, a database can store millions of rows efficiently and let multipl...
2Relational vs NoSQL. Relational: structured tables, ACID transactions, SQL language — MySQL, PostgreSQL, SQLite, SQL Server
3SQL Execution Order. SQL clauses execute in a different order than how you write them. Understanding this prevents confusing errors.
4Your First SQL Statement SQL -- The most basic SQL query SELECT * FROM students; -- Read it as: "Get all columns FROM the students table" -- SELECT = what columns to return (* = all) -- FROM = which table to look in -- More specific: SELECT name, age FROM students WHERE grade = 'A'; -- "Get name and age FROM students WHERE grade equals A" Section 5 SQL Sublanguages. SQL is divided into four sublanguages, each serving a different purpose.

Code Examples

-- The most basic SQL query SELECT * FROM students; -- Read it as: "Get all columns FROM the students table" -- SELECT = what columns to return (* = all) -- FROM = which table to look in -- More specific: SELECT name, age FROM students WHERE grade...