Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

MySQL: PRIMARY KEYS are easy

97.3K views on YouTube

#MySQL #tutorial #course

00:00:00 introduction
00:00:46 PRIMARY KEY with a new table
00:01:34 PRIMARY KEY with an existing table
00:02:11 examples
00:04:56 conclusion

– EXAMPLE 1 —

CREATE TABLE transactions (
transaction_id INT PRIMARY KEY,
amount DECIMAL(5, 2)
);

– EXAMPLE 2 —

ALTER TABLE transactions
ADD CONSTRAINT
PRIMARY KEY (transaction_id);