column alias
I would like an option for column aliases. I would like to choose between = or AS for the "Alias sign".
The formatting should be done based on this "alias sign" and also be aligned by the alias sign.
I prefer the = sign , but formatting doesn't seem to accept that as an alias now.
Example before formatting:
SELECT colA as [Column A], columnB as [ColumnLonger B]
FROM Table_1 t
Formatting when "=" is used as "Alias sign";
SELECT [Column A] = t.colA
,[ColumnLonger B] = t.columnB
FROM Table_1 t
Formatting when "AS" is used as "Alias sign":
SELECT t.colA AS [Column A]
, t.columnB AS [ColumnLonger B]
FROM Table_1 t
-
Jacky commented
Both two formats should be supported and formatter should be able to toggle between these two ways of formatting based on formatting rules from user settings.
It is also very important when you have a lot of code in one format and you need to change format in all codebase to another format. It's quite tedious to do it manually. -
Frederik Bergstedt commented
It would be great to format the text here like code to make the examples more readable.
Now it doesn't show the result in good way.