Comments in MS SQL

igitur posted 1 year ago in General

In MS SQL, this is a valid comment:

--select * from table

However, SynEdit doesn't highlight it as a comment. Only if a insert a space after the -- does it recognise it as a comment. In MySQL, the space is required, but not in MS SQL.

igitur posted 1 year ago

PS: I first assumed this was a SynEdit bug, so I posted it on their repo.

ansgar posted 1 year ago

SynEdit does not expect a space for any SQL dialect, and HeidiSQL expects a space for all. There is currently no differentiation for MSSQL, as I was thinking the space is required everywhere.

Please login to leave a reply, or register at first.