Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in SQL by (20.3k points)

In SQLite, how can I select records where some_column is empty?

Empty counts as both NULL and "".

1 Answer

0 votes
by (40.7k points)

In SQLite, there are several ways to select records where some_column is empty like this:

where some_column is null or some_column = ''

Otherwise, you can use this:

where ifnull(some_column, '') = ''

Or else you can use the below query:

where coalesce(some_column, '') = ''

Or use this query:

where ifnull(length(some_column), 0) = 0

Related questions

0 votes
1 answer
asked Oct 5, 2019 in Python by Tech4ever (20.3k points)
0 votes
1 answer
asked Jul 4, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
0 votes
1 answer
asked Jan 5, 2021 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Dec 12, 2020 in SQL by Appu (6.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers

500 comments

108k users

Browse Categories

...