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

Mention what is the plv (pl/vision) package offers?

1 Answers  


How do you explain an index number?

1 Answers  


Does truncate need commit?

1 Answers  


how to rename an existing column in a table? : Sql dba

1 Answers  


What is a table partition?

1 Answers  


what are set operators in sql? : Sql dba

1 Answers  


Why is a trigger used?

1 Answers  


What is integrity in sql?

1 Answers  


What is a CTE (Common Table Expression), and how is it different from a subquery?

3 Answers  


What is clause in sql?

1 Answers  


A table was given with 3 columns like Manager id,Manager Name and Employee name. Question was to create hierarchy.

2 Answers   TCS,


What is trigger point?

1 Answers  


Categories