MySQL: DEFAULT constraint is easy

  Рет қаралды 34,980

Bro Code

Bro Code

Күн бұрын

Пікірлер
@BroCodez
@BroCodez 2 жыл бұрын
- EXAMPLE 1 CREATE TABLE products ( product_id INT, product_name varchar(25), price DECIMAL(4, 2) DEFAULT 0 ); ALTER TABLE products ALTER price SET DEFAULT 0; INSERT INTO products (product_id, product_name) VALUES (104, "straw"), (105, "napkin"), (106, "fork"), (107, "spoon"); SELECT * FROM products; - EXAMPLE 2 CREATE TABLE transactions( transaction_id INT, amount DECIMAL(5, 2), transaction_date DATETIME DEFAULT NOW() ); SELECT * FROM transactions; INSERT INTO transactions (transaction_id, amount) VALUES (1, 4.99); SELECT * FROM transactions; INSERT INTO transactions (transaction_id, amount) VALUES (2, 2.89); SELECT * FROM transactions; INSERT INTO transactions (transaction_id, amount) VALUES (3, 8.37); SELECT * FROM transactions; DROP TABLE transactions;
@vaishnutejass2724
@vaishnutejass2724 2 жыл бұрын
very easy to understand thanku
@UNFOLDTECH
@UNFOLDTECH 2 жыл бұрын
yeah
@bichoron3603
@bichoron3603 6 ай бұрын
Great!! Please keep uploading videos of sql more & more
@timon1816
@timon1816 2 жыл бұрын
Dude, I was just thinking about trying Mysql today and you're releasing this video. Thank you very much!
@GldnClaw
@GldnClaw 10 ай бұрын
2:24 looks like you answered my question from a few videos ago.
@AishaSalat-k8i
@AishaSalat-k8i 3 ай бұрын
i just see myself graduating because of your page bro,thank you so much
@sweethomes674
@sweethomes674 2 жыл бұрын
Thank you-excellent 🕊
@MISA-qy4hx
@MISA-qy4hx 2 жыл бұрын
Why did you use ALTER instead of MODIFY? 03:40
@dixsonjoy5394
@dixsonjoy5394 11 ай бұрын
I also have this doubt
@apoorvsxna
@apoorvsxna 5 ай бұрын
This would also work- ALTER TABLE products MODIFY price DECIMAL (5,2) DEFAULT 0.00;
@bartsworkshop
@bartsworkshop Жыл бұрын
Thank you for making these videos, they are easy to follow and understand.
@mitishacolbert277
@mitishacolbert277 4 ай бұрын
You are the best
@imanelmzk2064
@imanelmzk2064 9 ай бұрын
you're a Legend, thank you so much!!, that's so helpful!!!!
@omarhashem6358
@omarhashem6358 2 жыл бұрын
Please continue the series❤
@Crazy_moments_of_footbal-qz1qr
@Crazy_moments_of_footbal-qz1qr 9 ай бұрын
you great!!!!!!
@techboomers8935
@techboomers8935 2 жыл бұрын
Kindly kindly Bro share us your Programming life journey or Q/A OR you interview and face revealed, love from Pakistan
@mohaymenul-islam
@mohaymenul-islam 2 ай бұрын
@nirajchaudhary1621
@nirajchaudhary1621 3 ай бұрын
👀
MySQL: PRIMARY KEYS are easy
5:25
Bro Code
Рет қаралды 57 М.
MySQL: JOINS are easy (INNER, LEFT, RIGHT)
5:04
Bro Code
Рет қаралды 504 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
MySQL: NOT NULL constraint
2:53
Bro Code
Рет қаралды 49 М.
MySQL: STORED PROCEDURES
8:02
Bro Code
Рет қаралды 105 М.
MySQL: CHECK constraint is easy
3:57
Bro Code
Рет қаралды 46 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,2 МЛН
MySQL: UNIQUE constraint
4:43
Bro Code
Рет қаралды 46 М.
MySQL: TRIGGERS
16:50
Bro Code
Рет қаралды 142 М.
MySQL: FOREIGN KEYS are easy (kind of)
8:17
Bro Code
Рет қаралды 253 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 227 М.
MySQL: AUTO_INCREMENT is awesome
3:55
Bro Code
Рет қаралды 70 М.