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 / ramakanth

y=x+y-(x=y)

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the different type of normalization? : Sql dba

554


Can we call a function containing dml statements in a select query?

544


What are different types of indexes?

508


How do I create a memory optimized filegroup?

527


How do I remove all records from a table?

563






Are null values same as that of zero or a blank space?

531


What is exit statement?

543


How can the performance of a trigger be improved?

588


What is blind sql injection?

572


What is record type in pl sql?

542


What is execute immediate?

549


Explain the significance of the & and && operators in pl sql.

569


Is id a reserved word in sql?

658


What is the limitation on the block size of pl/sql?

527


Why sql query is slow?

576