write a pl/sql function if enter a value=0 then output
value=1 and vise verse with out using if and case statements.
Answer Posted / rajesh venati
Hi all this will work for that one with out using if and
case statement.
create or replace function fun(a in number) return number
is
n number;
begin
n:=mod(1,a);
return n;
end;
SQL> select fun(1) from dual;
FUN(1)
----------
0
SQL> select fun(0) from dual;
FUN(0)
----------
1
| Is This Answer Correct ? | 18 Yes | 0 No |
Post New Answer View All Answers
Is full outer join same as cross join?
Is sql a scripting language?
What is difference between left and right outer join?
Can we rollback truncate?
how can we repair a mysql table? : Sql dba
What version is sql?
How many developers work on postgresql?
What does trigger mean in slang?
Is sql microsoft?
What is cartesian join in sql?
Where the sql database files are stored?
what are integrity rules?
Describe types of sql statements?
What is consistency?
What is the use of & in pl sql?