adspace


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 current version of postgresql?

1189


Is primary key clustered index?

1028


What is the best sql course?

1064


what are the advantages of sql ? : Sql dba

1154


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

1125


what is schema? : Sql dba

1165


If a cursor is open, how can we find in a pl/sql block?

1252


what is collation? : Sql dba

1242


Can we rollback truncate?

1086


what are aggregate and scalar functions? : Sql dba

1143


define sql insert statement ? : Sql dba

1110


Does group by remove duplicates?

1122


Can delete statement be rollbacked?

1065


What is the current version of sql?

1106


what are all the common sql function? : Sql dba

1143