Stage 1 · Lesson 3 of 8
The families of SQL statements
SQL statements come in a few families, grouped by what they touch. (CREATE, ALTER, DROP) builds and changes tables. Data manipulation language (SELECT, , UPDATE, DELETE) reads and changes the rows inside them.
Data control language (GRANT, REVOKE) decides who may do what. control (BEGIN, COMMIT, ROLLBACK) groups changes so they all succeed or all fail together. Knowing the family tells you the risk.
A wrong SELECT only shows you the wrong rows. A wrong DROP, or an UPDATE without a WHERE condition, can destroy data. Your first weeks will be mostly SELECT, and later stages cover the others in turn.
Common trapassuming every change can be undone: MySQL commits most DDL (changes to tables) immediately, while and can roll DDL back inside a transaction.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeCS50's Introduction to Databases with SQL
Harvard University · Beginner
Watch Lecture 0 (Querying) for the relational model; it uses SQLite, and the ideas carry straight across
- CourseFreeQuery and modify data with Transact-SQL
Microsoft · Beginner
Start with the Introduction to Transact-SQL module; it sets up a sample database in the browser or locally