--4:删除问卷
CREATE PROC [Questionaire].[DeleteQuestionaire]
@questionaireID INT
AS
BEGIN TRAN;
BEGIN TRY
--删除问卷基本题目
DELETE QuestionairesBasicQuestions WHERE QuestionaireID = @QuestionaireID
--删除问卷分段
DELETE QuestionairesSections WHERE QuestionaireID = @QuestionaireID
--删除问卷题目
DELETE QuestionairesQuestions WHERE QuestionaireID = @QuestionaireID
--删除问卷
DELETE Questionaires WHERE QuestionaireID = @QuestionaireID;
COMMIT TRAN;
END TRY
BEGIN CATCH
ROLLBACK TRAN;
END CATCH
---EXEC [Questionaire].[GetQuestionaires] @CurrentPage,@PageSize
GO
有关事务的应用
最新推荐文章于 2022-11-22 15:54:46 发布