What can i use for a no-op in T-SQL?

sql, syntax, t-sql

Solution

You could throw a `print` in there:

IF @parm = 1
    BEGIN
    print 'need to implement 1'
    END
IF @parm = 2
    BEGIN
    print 'need to implement 2'
    END

Problem

What's a good no-op in T-SQL? I want to use it as a place-holder in boilerplate code snippets. For example, if I'm stubbing out a query/UDF and have something like this: ``` IF @parm = 1 BEGIN END IF @parm = 2 BEGIN END ``` I'll get the following error: Incorrect syntax near the word 'END' What could I throw in between there that would silence the compiler i.e. be executable?

Original source

Related problems