MySQL: PRIMARY KEYS are easy

  Рет қаралды 41,120

Bro Code

Bro Code

Күн бұрын

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

Пікірлер: 16
@BroCodez
@BroCodez Жыл бұрын
- 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);
@RGGBMGO
@RGGBMGO Жыл бұрын
First, heart?Btw ur coding videos are the best, you help and educate so many 😁
@princeakinolaoluwagbemigag1750
@princeakinolaoluwagbemigag1750 Жыл бұрын
Thank you for this video big bro. Pls what is the difference between the primary key and the unique constraint?
@farisabufarha531
@farisabufarha531 Жыл бұрын
unique constraint could be null
@themachina7713
@themachina7713 Жыл бұрын
why does my sql table add a null row after i added a PRIMARY KEY constraint?
@martins__23
@martins__23 Жыл бұрын
Got the same question
@luistroyparaiso5853
@luistroyparaiso5853 Жыл бұрын
How do you make primary keys like "AA-0001"??
@peachezprogramming
@peachezprogramming Жыл бұрын
set the datatype to string
@farhangmdc
@farhangmdc Жыл бұрын
Good Video , How to get Primary Key Auto Generated ? 🔑🔑
@BroCodez
@BroCodez Жыл бұрын
next video
@tarunmangalampalli1179
@tarunmangalampalli1179 Жыл бұрын
Auto_increment
@crackrokmccaib
@crackrokmccaib Жыл бұрын
For whatever reason, I thought you were Canadian until now.
@kusumaparimi2929
@kusumaparimi2929 4 ай бұрын
create table transaction ( trans_id int, amount decimal(10,2), constraint pk_transaction primary key(trans_id, amount) ); we apply primary key for multiple columns using this query... but in this video said, only one primary key for each table??
@hertz-2007
@hertz-2007 3 ай бұрын
true
@emanuelitalo5073
@emanuelitalo5073 Жыл бұрын
make subtitles for portuguese br please😳😳😳
@MohammadMomin
@MohammadMomin 8 ай бұрын
John Smith Lol😂😂
MySQL: AUTO_INCREMENT is awesome
3:55
Bro Code
Рет қаралды 53 М.
MySQL: FOREIGN KEYS are easy (kind of)
8:17
Bro Code
Рет қаралды 193 М.
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,1 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 79 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 118 МЛН
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,7 МЛН
MySQL: JOINS are easy (INNER, LEFT, RIGHT)
5:04
Bro Code
Рет қаралды 342 М.
MySQL: DEFAULT constraint is easy
8:19
Bro Code
Рет қаралды 24 М.
Primary key on two columns SQL Server
5:39
kudvenkat
Рет қаралды 83 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 115 М.
MySQL: CHECK constraint is easy
3:57
Bro Code
Рет қаралды 32 М.
Primary & Foreign Keys
8:25
Eddie Woo
Рет қаралды 471 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,4 МЛН
MySQL - The Basics // Learn SQL in 23 Easy Steps
17:17
Fireship
Рет қаралды 804 М.
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,1 МЛН