I have to copy single row from the table on certain conditions.
Suppose this is my table:
ProductName ProductCount Isactive latest
AA 1 1 1
Bb 5 1 1
Now, suppose I want to edit the first row; what I will do is that I will not edit the first row itself, but I want to copy that particular row and then I want to update that row.
In the above scenario, I want to update ProductCount
then I want the output to be as:
ProductName ProductCount Isactive latest
AA 1 1 0
Bb 5 1 1
AA 6 1 1
How can we do this?
first do a insert into and then do an update .. it has to be in two steps ..