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
what is top in tsql? : Transact sql
What is the use of non clustered index?
Is sqlite free?
When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?
What are character functions in sql?
What is set transaction?
How does cross join work in sql?
How do I run a pl sql procedure in sql developer?
what is a field in a database ? : Sql dba
What is full join?
what is view? : Sql dba
Can we use joins in subquery?
How to pipe multiline string to isql?
What are types of indexes in sql?
What is the best free sql database?