Empty statement in T-SQL

后端 未结 5 1025
遇见更好的自我
遇见更好的自我 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 16:10

    while 1 = 0 break
    

    In function I can not use:

    if 1 = 0 print ''
    if 1 = 0 set nocount on
    if 1 = 0 waitfor delay '00:00'
    if 1 = 0 throw 50000, '', 10
    if 1 = 0 select 1
    if 1 = 0 return
    

    Labels or variables cannot be declared twice.

提交回复
热议问题