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
Explain how exception handling is done in advance pl/sql?
what is the difference between nested subquery and correlated subquery?
Explain what is rdbms?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
how can you create an empty table from an existing table? : Sql dba
What is data control language?
explain the options of myisamchk to improve the performance of a table. : Sql dba
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
Is oracel sql developer written in java?
What are synonyms in sql?
Is sql scripting language?
What is constant in pl sql?
What is nosql example?
How do I delete a trigger?
Can a foreign key have a different name?