-
Junior Member
How to rollback my sql query
hi,
any one who know how to rollback the SQL delete statement?
please reply asap. Urgent. thanks alot.
from bonnie
-
Re: How to rollback my sql query
you can simply execute the rollback command before commiting the transaction.
-
Junior Member
Re: How to rollback my sql query
but the have another transaction made before i rollback my query. so is it still possible to rollback?? thanks
-
Junior Member
Re: How to rollback my sql query
set errorcode to the particular instance of execution and then perform rollback transaction.
-
Junior Member
Re: How to rollback my sql query
how to set the error code??
please advice.
thanks.
-
Junior Member
Re: How to rollback my sql query
declare @errorCode int
set @errorCode=@@error
if (-@errorCode<>0)
begin
rollback transaction
end
commit transaction
-
Junior Member
Re: How to rollback my sql query
It is simple..............
Select * from tablename;
delete from tablename;
Rollback;
-
Junior Member
Re: How to rollback my sql query
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules