Replace NULL Discounts With Zero
Easy
NULL Handling
Return each product's name and its discount, showing 0 when the discount is NULL. Order by id.
Table schema
Products(id INT PRIMARY KEY, name VARCHAR(50), discount INT NULL)Sample data
id | name | discount
1 | Pen | 10
2 | Book | NULL
3 | Bag | 5
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.