News for hackers. Stuff that matters.
Re:Null Values in SQL Queries by trts on Monday February 03, 2020 @11:08AM (#22225414)
where coalesce(a, '') = coalesce(b, '')
Re:Null Values in SQL Queries by SigmundA on Monday February 03, 2020 @12:00PM (#22226082)
Normally can't use an index as every value has to be coalesced before comparison.
Re:Null Values in SQL Queries by danaliv on Monday February 03, 2020 @10:55PM (#22232236)
You can index the results of functions (or other expressions) in at least some databases. PostgreSQL can do this, for example.

  CREATE INDEX idx ON tbl (coalesce(col, ''))
Combining this with UNIQUE can make for some neat tricks.