Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 left join faster than inner join?

1166


What is union, minus and interact commands?

1359


What does cursor do in sql?

1062


Why is nosql good?

1076


How do you respond to dementia behavior?

1013


Explain the difference between 'between' & 'and' operators in sql

1032


What is self-join and what is the requirement of self-join?

1188


How do I remove sql plus from windows 10?

1139


How do I debug a stored procedure?

1158


what is a composite primary key ? : Sql dba

1090


How many subqueries can be nested in a statement?

1035


Explain lock escalation? : Transact sql

1263


Explain what is an index?

1102


How many row comparison operators are used while working with a subquery?

1069


Write a sql select query that only returns each name only once from a table?

1071