Change Line Comment Character

Answered

How can I change the line comment in a SQL file from # to -- in DataGrip? 

4
4 comments

There is no setting to control comment character. Every SQL dialect uses it's own. For example Generic or Oracle dialects use `--`, in MySql it is `#` character.

2
Avatar
Permanently deleted user

Great. Thanks so much for the response.

0
Avatar
Permanently deleted user

MySQL supports both # and -- single line comment styles. If you edit code in more than one IDE and they don't agree on which to use then it can be painful. I guess it's not a terribly high priority feature, but it would be useful to be able to specific which single line comment style to use.

1

Please sign in to leave a comment.