11. MySQL Part 2: UPDATE, ALTER, DELETE, Keys, Constraints and Users
Chala mitrano, kaal aapan data vachayla shiklo. Aaj data badlayla, table chi rachna badlayla, data kaadhayla aani database la niyam (keys, constraints) lavayla shikuya. Shevti users aani GRANT – kon kay karu shakto. Ha chapter khup important aahe, lakshat theva: ek chukicha UPDATE kiwa DELETE purna table udavto. Mhanun safe update mode aani transactions pan shikuya. Ghabru naka, pratyek query aadhi SELECT ne test karaychi – hi savay aajpasun.
What you will learn in this chapter
- UPDATE with WHERE, and testing with SELECT first
- Safe update mode (
SQL_SAFE_UPDATES, error 1175) and transactions - ALTER TABLE: add, modify, rename and drop columns, rename tables
- DELETE, TRUNCATE and DROP, and the exact differences between them
- All keys: primary, foreign, unique, composite, candidate, super and alternate
- Constraints: NOT NULL, DEFAULT, CHECK, AUTO_INCREMENT
- Creating users, GRANT, REVOKE and least privilege; backup with mysqldump
Concepts in this chapter
- 11.1UPDATE
- 11.2Safe Update Mode, Error 1175 and Transactions
- 11.3ALTER TABLE: Add, Modify, Rename and Drop Columns
- 11.4DELETE, TRUNCATE and DROP
- 11.5Keys: Primary, Foreign, Unique, Composite, Candidate, Super, Alternate
- 11.6Constraints: NOT NULL, DEFAULT, CHECK, AUTO_INCREMENT
- 11.7Users, GRANT, REVOKE and Least Privilege
The chapter recap is at the end of the last concept page.