Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Earlier versions of SQL-Server didn't recommend the use of semicolons to terminate sql-statements.

Beginning with sql-server-2008 examples show, that now Microsoft recommends terminating with semicolons.

There are some formating tools which format sql queries and add the semicolons. I think the basic function is somewhere in SMO.

The only problem is that these tools remove all the comments.

Any ideas how to preserve all comments and how to add all recommend semicolons?

share|improve this question
add comment

1 Answer

Start typing and don't trust code generators.

As you bring up procedures and code to edit it for other reasons, just add the semi-colon in then. You wouldn't want to deploy all your stored procedures in one batch just to add in the semi-colons only.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.