-1

I'm puzzled by this in Oracle

select case when 'hello' <> '' then 1 else 2 end from dual;

returns 2

select case when 'hello' <> 'hello' then 1 else 2 end from dual;

returns 2

however on SQL*Server this works as expected.

Luc M
  • 15,742
  • 26
  • 71
  • 88

1 Answers1

6

Empty string in Oracle acts as null - so your comparison <> null will be always false...
(edit proposed by igr)

Community
  • 1
  • 1
Egor Skriptunoff
  • 22,353
  • 2
  • 33
  • 62