there are 2 variables called x and y ,x contains 1,2 and y
contains 3,4 we have to swap the values from x to y and y
to x with out using dummy variables and it can be done only
by using a single statement ? how?
Answer Posted / santhi k
IN ORACLE...
SELECT DECODE(X,X,Y)X,DECODE(Y,Y,X)Y FROM TABLENAME;
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
Which is better trigger or stored procedure?
Which are the different types of indexes in sql?
What is meant by <> in sql?
Explian rowid, rownum? What are the psoducolumns we have?
what is sql? : Sql dba
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
What is dynamic sql in pl sql?
What is before and after trigger?
How do you modify a column in sql?
What is the difference between delete and truncate statement in sql?
What are the advantages of sql?
Explain what is dbms?
explain mysql aggregate functions. : Sql dba
What is the order of sql select?
List and explain the different types of join clauses supported in ansi-standard sql?