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 is a composite primary key?

767


How many commands are there in sql?

748


How do you rename a table in sql?

737


Can a trigger call a stored procedure?

748


What is materialized view in sql?

651






Can a varchar be a primary key?

699


Can we use ddl statements in stored procedure sql server?

725


what is a database transaction? : Sql dba

824


Which is faster truncate or drop?

779


What is sql basics?

782


What is sql mysql pl sql oracle?

784


what are the advantages a stored procedure? : Sql dba

710


How to fetch alternate records from a table?

865


What are the different types of joins in sql?

1152


How do you delete duplicates in sql query using rowid?

720