#ddl Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
SQL CREATE TABLE with Constraints
Declare data integrity rules right in the schema — primary keys, foreign keys, unique constraints, NOT NULL, CHECK constraints, defaults. The DB enforces them so application bugs can't corrupt your data.
SQL ALTER TABLE — Add / Drop / Rename Column
Evolve your schema in place. Most DBs run these as cheap metadata-only operations IF you avoid expensive rewrites — e.g. don't set a NOT NULL default on a huge table without thinking.