<p>I'd like to just put in a comment in the block of my if-statement, but I get an error when I try. I want to be more like Steve McConnell.</p>

<pre><code>declare @ConstraintName varchar(255)
set @ConstraintName = 'PK_Whatever'

IF LEFT(@ConstraintName, 2) = 'PK'
BEGIN
    --can't drop primary keys
END
</code></pre>

<p>The error I get is:</p>

<pre><code>Incorrect syntax near 'END'.
</code></pre>

<p>If I add something after the comment, i.e. <code>PRINT @ConstraintName</code>, it works fine.</p>

I can't say for sure in SQL Server, but in Oracle PL/SQL you would put a NULL statement in a block that you want to do nothing:
```
```
BEGIN
  -- This is a comment
  NULL;
END
```
```