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
Is left join faster than inner join?
What is union, minus and interact commands?
What does cursor do in sql?
Why is nosql good?
How do you respond to dementia behavior?
Explain the difference between 'between' & 'and' operators in sql
What is self-join and what is the requirement of self-join?
How do I remove sql plus from windows 10?
How do I debug a stored procedure?
what is a composite primary key ? : Sql dba
How many subqueries can be nested in a statement?
Explain lock escalation? : Transact sql
Explain what is an index?
How many row comparison operators are used while working with a subquery?
Write a sql select query that only returns each name only once from a table?