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

Explain mutating table error.

747


Can a commit statement be executed as part of a trigger?

704


What is varchar data type in sql?

610


Can we use ddl statements in stored procedure sql server?

611


How do you go back in sql?

628






Why do we use joins?

678


What are reports usually used for?

677


What is the use of prepared statement?

647


How to test for null values?

696


how to check myisam tables for errors? : Sql dba

748


What are tables and fields?

685


Can we rollback delete command?

600


How to call a javascript function from pl sql?

651


i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

1192


What do you mean by stored procedures?

652