clear markdown compare help best fiddles feedback dbanow.uk
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2555451 fiddles created (37470 in the last week).

-- У нас есть несколько коробок CREATE TABLE boxes ( id INT NOT NULL, title VARCHAR(255) )
 hidden batch(es)


INSERT INTO boxes(id, title) VALUES (1, 'first'), (2, null), (3, null)
3 rows affected
 hidden batch(es)


SELECT * FROM boxes WHERE title IS NOT DISTINCT FROM CASE WHEN 'first' = '' THEN title ELSE 'first' END
id title
1 first
 hidden batch(es)


SELECT * FROM boxes WHERE title IS NOT DISTINCT FROM CASE WHEN '' = '' THEN title ELSE '' END
id title
1 first
2
3
 hidden batch(es)