Single quote in double hyphen Comment line breaks the comment

[expired user #10858]'s profile image [expired user #10858] posted 7 years ago in General Permalink

I'm moving from the bloadware that is SSMS (thanks for HS BTW guys)

I paste a single stored procedure in and half of it is green and looks like a comment.

The reason is the ' single quote.

e.g.,

--Glo demo DB id's only update customer set name = 'Ashley Bethany', deleted = 0 where id = 54

Just doing my bit...

[expired user #1502]'s profile image [expired user #1502] posted 7 years ago Permalink

Strings started with double hyphens are comments in MySQL so I do not see any issues here.

kalvaro's profile image kalvaro posted 7 years ago Permalink

SQL editor is some third-party component that's mainly suited to MySQL so there're glitches like this, not sure if there's an easy fix.

In any case, don't drop SSMS yet. HeidiSQL is handy but quick lookups but SQL Server support is rather experimental.

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