Dev.to
CA 40 – Alter Tables
This exercise was about ALTER TABLE. Instead of creating table again, we modify existing table like adding constraints, defaults, columns etc. Make email NOT NULL in customers table sql id="h4r9b2" ALTER TABLE customers ALTER COLUMN email SET NOT NULL; This makes sure future rows must have email. Make username unique in users table sql id="9zv1qx" ALTER TABLE users ADD CONSTRAINT unique_username UNIQUE (username); This prevents duplicate usernames. Add check constraint price > 0 in products tabl
Read original on dev.to0
0Related
Hacker News
$500 GPU outperforms Claude Sonnet on coding benchmarks
Discussed on Hacker News with 377 points and 217 comments.
377
217Hacker News
Whistler: Live eBPF Programming from the Common Lisp REPL
Discussed on Hacker News with 115 points and 13 comments.
115
13Hacker News
Anthropic Subprocessor Changes
Discussed on Hacker News with 98 points and 44 comments.
98
44Liked this? Start your own feed.
Your own feed is waiting.
Comment
Sign in to join the discussion.
Loading comments…