Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Replace Empty Strings With NULL

Some phone values were saved as empty strings. Return id and phone with empty strings converted to NULL, ordered by id.

Table schema

Customers(id INT PRIMARY KEY, phone VARCHAR(15))

Sample data

id | phone
1 | 9876543210
2 | ''

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.