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...


if table named a is there
and 4 records are there then how to swap (1 and 3) and (2 and 4) records at a time



if table named a is there and 4 records are there then how to swap (1 and 3) and (2 and 4) records ..

Answer / lokeshwari

select id,decode(id,'1','3','3','1','2','4','4','2') from tb11;

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

How do you run a query?

0 Answers  


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

0 Answers   Microsoft,


what is difference between delete and truncate commands? : Sql dba

0 Answers  


Does google use sql?

0 Answers  


What is the fastest way of accessing a row in a table?

5 Answers   TCS,


How to copy a table in another table with datas?

9 Answers  


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

0 Answers  


What is procedure function?

0 Answers  


What does (+) mean in sql joins?

0 Answers  


Is left join faster than join?

0 Answers  


What is sql entity?

0 Answers  


Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on <table name> begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 Answers  


Categories