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 / ajitnayak
create or replace function vice_versa2 (inp_no number) return number
is
a number := 0;
begin
select decode(inp_no, 1, 0,1) into a from dual;
return a;
end;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is primary key and foreign key with example?
What is inner join in sql?
What is a table partition?
How you improve the performance of sql*loader? : aql loader
what is table? : Sql dba
Explian rowid, rownum? What are the psoducolumns we have?
What is a function in oracle pl sql?
Does pdo prevent sql injection?
What is a native sql query?
What is a record in pl/sql?
what are the differences between char and varchar? : Sql dba
What does pl sql stand for?
What is data definition language?
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What are the possible values that can be stored in a boolean data field?