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 materialized view in sql?
Why join is faster than subquery?
What are all the different types of indexes?
How do I truncate a word?
What are the most important ddl statements in sql?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
what are the differences between char and nchar? : Sql dba
What is an exception in pl/sql?
how can we repair a mysql table? : Sql dba
What is the difference between cross join and natural join?
Why select is used in sql?
What is a temp table?
what is column? : Sql dba
what is difference between delete and truncate commands? : Sql dba
Does sql require a server?