This Visual Studio 2010 extension adds basic SQL syntax highlighting (keywords, functions and variables) to string literals. Currently the following keywords are supported: - select, insert, delete, update,
- into, values, truncate, distinct, top, with,
- from, join, inner join, outer join, left outer join, right outer join, left join, right join, cross join,
- union, except,
- where, like, between, having, exists,
- order by, asc, desc, over, group by,
- on, in, is, not, as, and, or, all,
- create, alter, drop,
- table, function, procedure, view, schema,
- declare, set,
- if, begin, then, else, end, for, while, null,
- transaction, commit, rollback,
- exec, return, returns, print, use,
- bigint, numeric, bit, smallint, decimal, smallmoney, int, tinyint, money, float, real,
- date, datetimeoffset, datetime2, smalldatetime, datetime, time, timestamp,
- char, varchar, text, nchar, nvarchar, ntext,
- binary, varbinary, image,
- cursor, hierarchyid, uniqueidentifier, sql_variant, xml
And the following functions: - count, count_big, sum, min, max, avg,
- abs, newid, rand, isnull, coalesce,
- left, right, substring, ltrim, rtrim, upper, lower, charindex, len, stuff,
- getdate, dateadd, datediff, datepart, datename,
- convert, cast
- row_number
The plan is to add support SQL query detection to prevent highlighting string literals which aren't queries. To change the colors go to Tools > Options > Fonts and Colors (Environment) -> SQL Syntax Highlighting. Please note that this is an experimental release to get feedback
| |