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

How does a self join work?

990


Explian rowid, rownum? What are the psoducolumns we have?

945


What is materialized view in sql?

871


how to drop an existing view in mysql? : Sql dba

995


What is where clause in sql?

982


What is the reports view in oracle sql developer?

925


Explain what is rdbms?

991


Explain normalization and what are the advantages of it?

890


What does the acronym acid stand for in database management?

983


What is a unique key and primary key and foreign key?

918


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

986


What is the requirement of self-join?

1025


What is a rank in sql?

898


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

2110


How do you update sql?

912