Can an insert ever execute without error but not insert anything? I am using sql server 2008 and wondering if I can get away with just checking @@error or is there something I am missing. For an update I check @@error and @@rowcount. Having @@rowcount = 0 for an insert just seems strange to me.
edit
@Gregory I basically wondering how I should error check an insert statement. Are there any strange boundary cases where an insert execute and @@error is 0?
You can run an
INSERTcommand using a select that returns an empty table.The statement will succeed but no rows updated.