Return boolean value from oracle function
问题 Trying to return value from function create or replace function compairenumber(num1 in number,num2 in number) return boolean is begin if num1 < num2 then return true; else return false; end if; end; when i'm giving query select compairenumber(5,10) from dual its not returning true or false. 回答1: Boolean values can only be used in other PL/SQL code, not in Oracle SQL. If you want a function whose return value is available in a select ... from dual then you will need to define the function to