uuid 6052353D-4EDA-4263-9535-4293100AA58A patterns include #comments name support.constant.dbo.sql match (dbo|\[dbo\]) name constant.other.symbol match \w+.(dbo|\[dbo\]).\w+ include #variables include #quoted-identifier include #types include #single-quote-string begin (OBJECT_ID)(\() endCaptures 1 name punctuation.args.end.sql beginCaptures 2 name punctuation.args.start.sql 1 name support.function.sql name meta.f.object-id.sql patterns include #single-quote-string end (\)) name keyword.control.batch.sql match (?i)^\s*GO\b name keyword.control.sql match (?i)\b(EXEC)\b name keyword.control.logic.sql match (?i)\b(IF)\b name constant.language.sql match (?i)\b(NULL|NOT NULL|ASC|DESC)\b name keyword.control.operator.sql match (?i)\b(AND|OR|NOT|IS|IN|EXISTS|GOTO)\b name keyword.control.definitions.sql match (?i)\b(AS|BEGIN|END|BEGIN CATCH|END CATCH|CATCH|RAISERROR|RETURN)\b name keyword.data.sql match (?i)\b(INSERT|INTO|DELETE|SELECT|FROM|WHERE|ORDER BY|UNION|VALUES|REFERENCES|PRIMARY KEY|IDENTITY|DEFAULT|INNER|JOIN|DECLARE|SET|TABLE|OUTPUT|UPDATE|DISTINCT|ON|PRINT|CREATE VIEW|FOR XML PATH|FETCH|WHILE|NEXT|OPEN|FOR)\b name entity.name.function match (?i)\b(DATEDIFF|getdate)\b captures 2 name support.type.sql 4 name support.constant.dbo.sql 5 name punctuation.delimiter.sql 1 name support.function.sql 3 name entity.name.function.sql name meta.create-procedure.sql match (?i)(CREATE)\s+(PROCEDURE)\s+((?:(dbo)(\.))?\S+) captures 2 name support.type.sql 4 name support.constant.dbo.sql 5 name punctuation.delimiter.sql 1 name support.function.sql 3 name entity.name.function.sql name meta.create-table.sql match (?i)(CREATE)\s+(TABLE)\s+((?:(dbo)(\.))?\S+) name constant.numeric.sql match \d+ name T-SQL scopeName source.tsql fileTypes sql repository table-var name variable.table.sql match #([a-zA-Z])(\w)* types captures 2 name keyword.punctuation.size.start.sql 4 name constant.language.sql 5 name keyword.punctuation.size.end.sql 1 name storage.type.sql 3 name storage.modifier.sql name meta.datatype.sql match (?xi) \b( bigint| int| integer| smallint| tinyint| bit| (?:decimal(\()(\d+|\d+\s*,\s*\d+))| numeric| money| smallmoney| float| real| datetime| smalldatetime| char| varchar| text| nchar| (?:nvarchar(\()(\d+|(max)))| ntext| binary| varbinary| image| cursor| rowversion| sql_variant| timestamp| uniqueidentifier| xml )\b local-var name variable.parameter.local.sql match @{1,2}([a-zA-Z])(\w)* variables patterns include #local-var include #table-var include #script-var comments patterns captures 1 name punctuation.definition.comment.sql name comment.line.double-dash.sql match (--).*$\n? begin /\* name comment.block.sql end \*/ quoted-identifier begin \[ name variable.other.quoted-identifier.sql patterns include #script-var end \] script-var name variable.scripting.sql match \$\(([a-zA-Z])(\w)*\) single-quote-string begin (N?)' name string.quoted.single.sql patterns include #script-var end '