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 / preeti mishra
update T
set A:=A+B,
B:=A-B,
A:=A-B;
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is type and rowtype in pl sql?
What is the difference between function, procedure and package in pl/sql?
what is normalization? : Sql dba
What is implicit cursor in pl sql?
What is auto increment?
What jobs use sql?
What is a .db file?
What is trigger and how to use it in sql?
What does t sql mean?
Is sql scripting language?
What is the difference between clustered and non-clustered indexes?
How do I view a procedure in sql?
How to change sql*plus system settings?
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
What is pessimistic concurrency control? : Transact sql