hi,
any one who know how to rollback the SQL delete statement?
please reply asap. Urgent. thanks alot.
from bonnie:)
Printable View
hi,
any one who know how to rollback the SQL delete statement?
please reply asap. Urgent. thanks alot.
from bonnie:)
you can simply execute the [B]rollback[/B] command before commiting the transaction.
but the have another transaction made before i rollback my query. so is it still possible to rollback?? thanks
set errorcode to the particular instance of execution and then perform rollback transaction.
how to set the error code??
please advice.
thanks.
declare @errorCode int
set @errorCode=@@error
if (-@errorCode<>0)
begin
rollback transaction
end
commit transaction
It is simple..............
Select * from tablename;
delete from tablename;
Rollback;
Dear Venugopal,
We execute the queries
Select * from tablename;
delete from tablename;
Rollback;
But we are not able to Rollback the data but we get the message "The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION".
Please resolve this problem