Search code examples
sql-servert-sql

Empty statement in T-SQL


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


Solution

  • No. There is not a "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