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 the difference between jpql and sql?
What mean sql?
What are the datatypes available in pl/sql ?
what is the stuff function and how does it differ from the replace function? : Sql dba
What is the difference between a procedure and a function?
what is the difference between union and union all? : Sql dba
What are sql*plus environment variables?
How many types of normalization are there?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
What port does sql server use?
Do we need to rebuild index after truncate?
What's the difference between a primary key and a clustered index?
Is grant a ddl statement?
what is the difference between char_length and length? : Sql dba
How do you exit in sql?