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 are sql triggers used for?
Can there be more than one function with a similar name in a pl/sql block?
What does sign mean sql?
What is trigger types in sql?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
How to write pl sql program in mysql command prompt?
What are its different types of dbms?
what are the types of subquery? : Sql dba
How can you know that statistics should be updated?
What is scalar data type in pl sql?
how is myisam table stored? : Sql dba
What is a data definition language?
What is a variable in sql?
Can we join same table in sql?
How much ram can sql express use?