What is SQL: Databases, DBMS and RDBMS
SQL is the declarative language used to define and query relational data. Start here to see what a database, a DBMS and an RDBMS actually are.
A complete SQL path: fundamentals, DDL and DML, querying, joins, subqueries, CTEs, window functions, design, indexing, transactions, performance and security.
91 notes in 31 topics
SQL is the declarative language used to define and query relational data. Start here to see what a database, a DBMS and an RDBMS actually are.
Tables hold typed columns and unordered rows, schemas hold tables, and every value obeys the type its column declares.
How a SQL statement is built: clause order, keywords versus identifiers, quoting rules, statement terminators and the two comment styles.
Numeric, string, date and boolean types across the major dialects, and how to pick the type that stops bad data at the door.
Arithmetic, comparison, logical, string and set operators, how precedence works, and where an expression may legally appear.
Two small schemas - a company HR database and a shop sales database - used by every example in this SQL path. Create them once and follow along.
CREATE defines the objects data lives in. Learn CREATE DATABASE, CREATE SCHEMA and CREATE TABLE, with column definitions and inline constraints.
ALTER changes a table that already holds data. Add and drop columns, change types, set defaults and manage constraints without losing rows.
Three ways to remove data, with very different consequences. Learn what each one destroys, what can be rolled back and what resets identity counters.
Every way to put rows into a table: explicit column lists, multi row VALUES, INSERT ... SELECT, defaults and handling duplicate keys.
UPDATE changes existing rows. Learn multi column updates, conditional logic with CASE, updates driven by a join and how to check the blast radius firs...
DELETE removes rows permanently. Learn targeted deletes, deleting through a join, soft deletes and the habits that stop a one line mistake becoming an...