Oracle PL/SQL Datatype Oracle PL/SQL Datatype oracle oracle

Oracle PL/SQL Datatype


It is a boolean. It's equivalent to:

boolean temp;... if (temp1 < (temp2/3) then  temp := true;else  temp := false;end if;


Oracle is a little bit complicated in this case. SQL and PL/SQL are interpreted by two distinct engines. Each of them has it's own set of datatypes even if they look similar. Simply VARCHAR2 in SQL is something different from VARCHAR2 in PL/SQL. It gets a little bit more confusing when you start working collections. Also SQL does not have any datatype like BOOLEAN while PL/SQL does.The only exception is SQL function LNNVL which accepts a condition as a parameters, but anyway you can not use literals like "true" or "false" is SQL queries.