↓Skip to main content

Sql

SQL Basics
·3 mins
Algorithm Database Sql
Combining conditions in SELECT … WHERE, and NULL’s three-valued logic: any comparison with NULL is not true, so use IS NULL
LeetCode 584: Find Customer Referee
·1 min
LeetCode Easy Database Sql
LeetCode 584 note: referee_id != 2 misses NULLs, since comparing with NULL is unknown; add IS NULL explicitly
LeetCode 1757: Recyclable and Low Fat Products
·1 min
LeetCode Easy Database Sql
LeetCode 1757 note: both conditions must hold, so filter with WHERE … AND …