日期:2014-05-18 浏览次数:20481 次
ALTER PROCEDURE [dbo].[YK_FeedBack_Add] @Title NVARCHAR(200), @Inputer NVARCHAR(50), @TheContent NTEXT, @Name NVARCHAR(20), @Age INT AS BEGIN BEGIN TRY BEGIN TRANSACTION INSERT INTO [YK_FeedBack](Title,Inputer,TheContent) VALUES(@Title,@Inputer,@TheContent) INSERT INTO [YK_User](Name,Age) VALUES(@Name,@Age) COMMIT TRANSACTION --希望成功返回1 RETURN 1 END TRY BEGIN CATCH IF @@ERROR > 0 ROLLBACK TRANSACTION --希望失败返回2 RETURN 2 END CATCH END