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


Please Help Members By Posting Answers For Below Questions

What is materialized view in sql?

465


Why join is faster than subquery?

599


What are all the different types of indexes?

623


How do I truncate a word?

527


What are the most important ddl statements in sql?

573






How to avoid using cursors? What to use instead of cursor and in what cases to do so?

601


what are the differences between char and nchar? : Sql dba

595


What is an exception in pl/sql?

544


how can we repair a mysql table? : Sql dba

540


What is the difference between cross join and natural join?

565


Why select is used in sql?

518


What is a temp table?

567


what is column? : Sql dba

571


what is difference between delete and truncate commands? : Sql dba

578


Does sql require a server?

529