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

What is the difference between jpql and sql?

1087


What mean sql?

1000


What are the datatypes available in pl/sql ?

1095


what is the stuff function and how does it differ from the replace function? : Sql dba

1037


What is the difference between a procedure and a function?

1098


what is the difference between union and union all? : Sql dba

1013


What are sql*plus environment variables?

1087


How many types of normalization are there?

954


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

1031


What port does sql server use?

1052


Do we need to rebuild index after truncate?

1030


What's the difference between a primary key and a clustered index?

983


Is grant a ddl statement?

894


what is the difference between char_length and length? : Sql dba

1037


How do you exit in sql?

1102