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
explain the difference between bool, tinyint and bit. : Sql dba
Which version of sql do I have?
Is left join same as join?
Explain what is a column in a table?
Which command is used to call a stored procedure?
What is offset in sql query?
What is a join?
What is record data type?
How many indexes can be created on a table in sql?
What are the different schemas objects that can be created using pl/sql?
Does sql view stored data?
Explain commit, rollback and savepoint.
what are the advantages of sql ? : Sql dba
Which normal form is best?
What does the base_object_type column shows in the user.triggers data dictionary view?