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 different clauses used in sql?
What is sql basics?
Why select is used in sql?
What is the difference between local and global temporary table?
Why left join is used in sql?
Can instead of triggers be used to fire once for each statement on a view?
what are the different index configurations a table can have? : Sql dba
What is difference between stored procedure and trigger?
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
How many types of index are there?
Does sql use python?
what is data integrity? : Sql dba
What is nosql vs sql?
What are the different types of triggers?
Which is better trigger or stored procedure?