79231655

Date: 2024-11-27 19:35:56
Score: 1
Natty:
Report link

You should use GREATEST/LEAST, this function returns NULL if at least one value is NULL.

So this code:

select * from TABLE where LEAST(COLUMN_1, COLUMN_2, COLUMN_3, COLUMN_4) is not null

will only return results if all columns are non-null.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: chatran