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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between local variables and global variables?

600


How many types of primary keys are there?

525


What is sql integrity?

577


What is time based sql injection?

484


What is full join in sql?

516






how to escape special characters in sql statements? : Sql dba

504


Why do we create stored procedures & functions in pl/sql and how are they different?

498


What information is needed to connect sql*plus an oracle server?

581


Enlist the characteristics of pl/sql?

1235


What is crud stand for?

561


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

615


What are the different types of a subquery?

513


How do I edit a stored procedure?

550


Is sql free?

497


How do you remove duplicate records from a table?

507