END
DECLARE @d INT
set @d = 1
IF @d = 1 BEGIN
-- 打印
PRINT '正确'
END
ELSE BEGIN
PRINT '错误'
END
-- Sql 里的多条件选择语句.
DECLARE @iRet INT, @PKDisp VARCHAR(20)
SET @iRet = 1
Select @iRet =
CASE
WHEN @PKDisp = '一' THEN 1
WHEN @PKDisp = '二' THEN 2
WHEN @PKDisp = '三' THEN 3
WHEN @PKDisp = '四' THEN 4
WHEN @PKDisp = '五' THEN 5
ELSE 100
END
-- 循环语句
WHILE 条件 BEGIN
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/