ToolScope Notes

SQL Notes in Simple English — Code Scope

Free SQL notes for beginners: what a database is, tables, rows and columns, creating tables and data types, the full CRUD set, WHERE, ORDER BY and LIMIT, JOINs, keys and database design, constraints, subqueries, indexes, transactions, views and permissions — and a complete store (dukaan) database project. Real SQL queries with real result tables, common mistakes and practice tasks in every lesson. From the Code Scope SQL series.

12 lessons — Code Scope series DB.1–DB.12 Read online — free PDF download for every lesson Code you can copy & run

SQL Notes

12 LESSONS · CODE SCOPE SERIES DB.1–DB.12

The language databases listen to: what a database is, tables, rows and columns, CREATE TABLE and data types, the full CRUD set, WHERE with ORDER BY and LIMIT, JOINs across tables, primary and foreign keys, constraints, subqueries, indexes, transactions, views and permissions — and one complete project, a store (dukaan) database.

Lesson DB.1

Database Kya Hai? + SQL Ka Taaruf

What a database is and why apps need one: tables, rows and columns, your first SELECT — and the SQL vs NoSQL comparison, with when each one wins.

Read the notes Video
Lesson DB.2

Pehli Table Banana — CREATE + Data Types

Build your first table: CREATE TABLE, the main data types (INT, VARCHAR, DECIMAL, DATE, BOOLEAN), and reading the DESCRIBE result.

Read the notes Video
Lesson DB.3

CRUD — INSERT / SELECT / UPDATE / DELETE

The four jobs every app does with data: add rows with INSERT, read with SELECT, change with UPDATE, remove with DELETE — and the WHERE that keeps them safe.

Read the notes Video
Lesson DB.4

WHERE, ORDER BY, LIMIT — Chhanna Aur Tartib

Filter and arrange your answers: WHERE with AND/OR, LIKE, IN and BETWEEN, sorting with ORDER BY, and top results with LIMIT.

Read the notes Video
Lesson DB.5

JOINs — Do Tables Ko Jorna

Answer questions that live in two tables: INNER JOIN for matching rows only, LEFT JOIN for everyone — and the NULL that tells the truth.

Read the notes Video
Lesson DB.6

Primary Key, Foreign Key + Design Ke Usool

Give every row an identity and every table a safe link: PRIMARY KEY, FOREIGN KEY, the errors that guard them, and three design rules.

Read the notes Video
Lesson DB.7

Constraints Deep — Database Ke Sakht Usool

Stop bad data at the door: NOT NULL, UNIQUE, DEFAULT, CHECK, and what happens to children when a parent row is deleted.

Read the notes Video
Lesson DB.8

Subqueries — Sawal Ke Andar Sawal

A question inside a question: subqueries in WHERE, in the SELECT list, and with IN — above-average students without knowing the average.

Read the notes Video
Lesson DB.9

Indexes — Database Ki Firasat (Speed Ka Raaz)

Why big tables answer slowly and how an index fixes it: CREATE INDEX, reading EXPLAIN, and the honest cost every index charges.

Read the notes Video
Lesson DB.10

Transactions — Ya Sab, Ya Kuch NAHI

All or nothing: the bank-transfer disaster, BEGIN / COMMIT / ROLLBACK, and how a transaction makes a half-done job impossible.

Read the notes Video
Lesson DB.11

Views + Data Ko Mehfooz Rakhna (Users & Permissions)

Saved questions and safe doors: CREATE VIEW, why a view is live and not a photo, and GRANT — giving each user only the access they need.

Read the notes Video
Lesson DB.12

SQL Project: Dukaan (Store) Ka Mukammal Database

The whole series in one project: a store's products, customers, orders and order items — schema, data, sales reports and stock alerts.

Read the notes Video