If I have a table T with 4 rows & 2 columns A & B. A has
values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL
query which can Swap the values of A & B for all records.
(Do not use a sub-query)
Answer Posted / lova raju allumalla
update T set A=B,B=A where A in (select A from T);
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What has stored procedures in sql?
Mention what is the function that is used to transfer a pl/sql table log to a database table?
What is nvl?
What is the difference between nvl function, ifnull function, and isnull function?
What is the purpose of cursors in pl/sql?
What operators deal with null?
what is the difference between where clause and having clause? : Sql dba
What is crud diagram?
Explain what is an index?
What is string join?
What does joining a thread mean?
What is the execution plan in sql?
How to start the command-line sql*plus?
How can you view the errors encountered in a trigger?
What is a parameter query?