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 / avi007
select A as "B",B AS "A" from T;
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is difference between stored procedure and trigger?
What is a heap in sql?
What is a Mapplet?
What is the command used to fetch first 5 characters of the string?
how to start mysql server? : Sql dba
What is sql architecture?
What are analytic functions in sql?
What is the source code of a program?
what is the difference between a local and a global temporary table? : Sql dba
Explain locks? : Transact sql
Which is faster view or stored procedure?
Why do we use sqlite?
What are the different ways to optimize a sql query?
When can we use the where clause and the having clause?
Explain the difference between 'between' & 'and' operators in sql