Dev.to
Alter Queries
In this assignment, I worked on modifying existing tables using ALTER TABLE. This helped me understand how to update constraints without recreating tables. 1.Make email NOT NULL in customers ALTER TABLE customers ALTER COLUMN email SET NOT NULL; 2.Make username UNIQUE in users ALTER TABLE users ADD CONSTRAINT unique_username UNIQUE (username); 3.Add CHECK constraint on price > 0 in products ALTER TABLE products ADD CONSTRAINT price_check CHECK (price > 0); 4.Set default 'pending' for status in o
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…