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

Is progress software supports to ( pl/sql )?

533


What is full join?

535


Enlist the characteristics of pl/sql?

1247


what is view? : Sql dba

560


How do I view an execution plan in sql?

535






What are primary key and foreign key and how they work?

556


Is it possible for a table to have more than one foreign key?

585


how to increment dates by 1 in mysql? : Sql dba

543


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

558


how tsql statements can be written and submitted to the database engine? : Transact sql

540


How do we use distinct statement? What is its use?

558


How do I turn a list into a table?

515


what are local and global variables and their differences? : Sql dba

543


What are the qualities of 2nf?

547


What is pl sql block structure?

547