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

Why is stored procedure faster than query?

1021


What are the different schemas objects that can be created using pl/sql?

1085


What is difference between sql function and stored procedure?

1063


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

1019


Explain spool.

1219


how to use regular expression in pattern match conditions? : Sql dba

1089


What is data modelling in sql?

1075


What is #table in sql?

1182


What is the use of triggers?

1083


Can we insert data in view?

1009


Why stored procedures are faster than query?

1079


What are sql commands?

1067


What is the default isolation level in sql server? : Transact sql

1087


what are the advantages a stored procedure? : Sql dba

1018


How to find 3rd highest salary of an employee from the employee table in sql?

1133