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 / amit

UPDATE T
SET A = B, ENVDOR_NUMBERB = A

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of operators available in sql?

542


What is embedded sql what are its advantages?

500


What is the reports view in oracle sql developer?

534


What does closing a cursor do?

756


What is rename command in sql?

460






What is cursor and its types?

548


what are the advantages and disadvantages of views in a database? : Sql dba

525


What is the difference between microsoft access and sql server?

522


what is the difference between truncate and delete statement? : Transact sql

533


Write a sql query to convert all character to uppercase after hypen.

953


How to use distinct and count in sql query? Explain

603


How do you change a value in sql?

542


How do I save the results of sql query in a file?

526


How do I count rows in sql?

551


How do I restart sql?

514