I tried to:
select 1>2 from dual; but got:
ORA-00923: FROM keyword not found where expected Is there boolean type for column expression in Oracle SQL?
I able to do:
select case when 1>2 then 'T' else 'F' end from dual; Originally I tried to compare date fields and the quickest way I found was getting difference and look to sign...
UPDATE I tried SIGN function, I don't know if it is vendor specific extension:
select SIGN(1-2) from dual; select SIGN(DATE '2017-01-02' - DATE '2017-02-12') from dual; but this trick doesn't work for strings...
char()or small integer.signreturns -1, 0 or 1 (or null) according to the sign of the operand. You could usecaseto test string values. Column datatypes are listed here. Avoidcharat all costs.