Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 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.4k 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 Jul 4, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
asked Oct 5, 2019 in Python by Tech4ever (20.3k points)
0 votes
1 answer
0 votes
1 answer
asked Jan 5 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!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...