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 the difference between delete and truncate statement in sql?

679


Difference between truncate, delete and drop commands?

730


What are the types of variable use in pl sql?

741


What are sql injection vulnerabilities?

690


What information is needed to connect sql*plus an oracle server?

760






Can you have more than one trigger on a table?

704


What is the maximum rows in csv?

644


what is the difference between a web-garden and a web-farm? : Sql dba

749


Is it important to partition hard disk?

738


Is there a 64 bit version of ssms?

675


What are two statement types in sql?

739


What is microsoft t sql?

676


What are the advantages of normalization?

781


Can we commit in trigger?

696


Does sqlite need a server?

732