ORA-06550: line 6, column 16: PLS-00103: Encountered the symbol "true" when expecting one of the fol
when i am trying to execute a function i am getting the above true
this is not exact code but due to security reasons i am using the emp table
create or replace function fun(p_empno in number)return boolean is
l_count number;
begin
select count(1) into l_count from emp where empno=p_empno;
if l_count >0 then
return(true);
else
return(false);
end if;
end;
declare
l_empno number:=&empno;
l_status boolean;
begin
l_status:=fun(l_empno);
if l_status is 'true' then
dbms_output.put_line('empno:'||l_empno||'in the table is exists');
this is not exact code but due to security reasons i am using the emp table
create or replace function fun(p_empno in number)return boolean is
l_count number;
begin
select count(1) into l_count from emp where empno=p_empno;
if l_count >0 then
return(true);
else
return(false);
end if;
end;
declare
l_empno number:=&empno;
l_status boolean;
begin
l_status:=fun(l_empno);
if l_status is 'true' then
dbms_output.put_line('empno:'||l_empno||'in the table is exists');
0