0

for the sql statements below,

  1. select 1 + null from dual;
  2. select 1 > null from dual;

why statement 1 is accepted but 2 has error in Oracle?

yuc
  • 13
  • 5
  • 2
    `1 > something` would evaluate to `true` or `false` (or in your specific example, `null`), and Oracle SQL doesn't have a boolean data type - at least not until [23c](https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Changes-in-This-Release-for-Oracle-Database-SQL-Language-Reference.html#GUID-3C11D3A9-8B14-4DCC-B212-B7FE57EE81E8). – Alex Poole Aug 25 '23 at 08:05
  • What output do you expect to see? – William Robertson Aug 26 '23 at 11:08

0 Answers0