#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);