sql if column is empty then code example Example: sql if empty then SELECT COALESCE(NULLIF(SomeColumn,''), ReplacementColumn) FROM SomeTable