Empty statement in T-SQL

后端 未结 5 1027
遇见更好的自我
遇见更好的自我 2020-12-09 15:32

Is there an empty statement keyword in T-SQL in Sql Server 2005 or newer? Something like NULL statement in PL/SQL.

5条回答
  •  温柔的废话
    2020-12-09 15:58

    You can declare a label to do nothing.

    DECLARE @value INT
    
    IF @value IS NULL
    BEGIN
    no_op1: 
    END
    

提交回复
热议问题