日期:2014-05-18 浏览次数:20862 次
BEGIN TRAN BEGIN TRY DECLARE @UserID INT insert into x_user(user_name) values('2') SET @UserID = @@IDENTITY insert into x_oper(usr_id,oper_name) values(@UserID,'系统管理员') COMMIT TRAN END TRY BEGIN CATCH ROLLBACK TRAN END CATCH
------解决方案--------------------
用output最稳当