Search code examples
sqloracleplsqlsqldatatypes

Oracle PL/SQL Datatype


Learning about SQL datatypes in PL/SQL. I have a question about what datatype the following expression is:

temp := temp1 < (temp2/ 3);

I'm a bit confused on what datatype this may be. Datatypes can be Numeric, Characters, Boolean, Datetime, and Interval types but this one is throwing me off because of the expressions < and /. This makes me think it's Boolean but I'm not sure.


Solution

  • It is a boolean. It's equivalent to:

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