[dba-SQLServer] Cancel INSERT?

Stuart McLachlan stuart at lexacorp.com.pg
Sat Mar 4 17:36:03 CST 2006


On 4 Mar 2006 at 14:57, Susan Harkins wrote:

> I know I can wrap INSERT in a transaction. Barring a transaction that keeps
> the action from being committed, is there anyway to undo an INSERT action
> that's been committed?
> 

Assuming you have an Identity field, want to undo the INSERT immediately 
after it is committed, how about "Delete from myTable where Key = " & 
@@IDENTITY -- 
Stuart





More information about the dba-SQLServer mailing list