SQL Server Error 113: Missing end comment mark ‘*/’

SQL Server error message 113 occurs when you omit a closing comment mark.

This can occur when you open a comment but forget to close it. It can also occur when you accidentally type an opening comment.

There may also be odd occasions where you get this error due to other factors, such as the way your SQL utility handles certain keywords etc.

Example

Here’s an example of some T-SQL code that returns this error:

/*
select @@version

Result:

Msg 113, Level 15, State 1, Line 5
Missing end comment mark ‘*/’.

Depending on your setup, you might get a different error, such as the following:

Execution failed due to an unexpected error:
SQL Execution error: A fatal error occurred.
Incorrect syntax was encountered while /*
select @@version was being parsed.

Or

Invalid SQL statement or JDBC escape, terminating '*/' not found.

How to Fix the Error

The way to fix this error is to either add a closing comment mark, or remove the opening one.

So either:

/*
select @@version
*/

Which makes the whole thing a comment, or:

select @@version

Which removes the comment, and runs the statement.

Obviously, this is just a sample statement for demonstration purposes. Your statement will probably be different.