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
Why is stored procedure faster than query?
What are the different schemas objects that can be created using pl/sql?
What is difference between sql function and stored procedure?
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
Explain spool.
how to use regular expression in pattern match conditions? : Sql dba
What is data modelling in sql?
What is #table in sql?
What is the use of triggers?
Can we insert data in view?
Why stored procedures are faster than query?
What are sql commands?
What is the default isolation level in sql server? : Transact sql
what are the advantages a stored procedure? : Sql dba
How to find 3rd highest salary of an employee from the employee table in sql?