2014年4月11日

SavePoint

摘要: Whenever you roll back a transaction, it nullifies the effect of every command you’ve executed sinceyou started the transaction. But what happens if you want to roll back only part of an ongoing transaction?SQL Server handles this with a feature called savepoints.Savepoints are markers that act li.. 阅读全文

posted @ 2014-04-11 13:59 齐文宣 阅读(151) 评论(0) 推荐(0)

@@ERROR 变量

摘要: 如果这样用UPDATE Accounts SET Balance = Balance + @Amount WHERE AccountID = @ID_AIF (@@ERROR > 0) GOTO PROBLEM需要注意: When using the @@ERROR value in Transact-SQL, you must be careful tocheck it immediately after each operation. That’s because @@ERROR is reset to 0 when a successfulSQL statement is comp 阅读全文

posted @ 2014-04-11 13:44 齐文宣 阅读(196) 评论(0) 推荐(0)

导航