views:

28

answers:

1

Hi,

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

+2  A: 

No. There is "No operation" equivalent.

  • For a stored proc, you'd have at least SET NOCOUNT ON.
  • For an IF/ELSE, if a condition is empty omit it

Otherwise, why do you ask please? To be precise, what's the point?

gbn
OK. Thanks. I need it for my SQL generator. But anyway it seems that I must remove an empty branch (IF/ELSE, CASE) earlier, from my intermediate objects.I found that empty statement can be "emulated" by an empty block (BEGIN END) but it doesn't look good.
ternyk