oracle - Case expressions and boolean -
please explain, why first 1 works , others return errors.
returns 'blue':
select case when 'a' = 'a' 'blue' end dual;error: ora-00920: invalid relational operator
select case when true 'blue' end dual;ora-00904: "true": invalid identifier
select case when 'a' = 'a' true end dual;ora-00905: missing keyword
select case when 'b' = 'b' 'a' = 'a' end dual;
there no real boolean sql type in oracle sql. neither true or false constants. boolean represented single characters 'y' or 'n' or numbers 0 or 1.
Comments
Post a Comment