Variable: sql-mode-ms-font-lock-keywords
sql-mode-ms-font-lock-keywords is a variable defined in sql.el.gz.
Value
(("^\\(?:\\(?:set\\s-+\\(?:\\(a\\(?:nsi_\\(?:defaults\\|null\\(?:_dflt_o\\(?:ff\\|n\\)\\|s\\)\\|padding\\|warnings\\)\\|rith\\(?:abort\\|ignore\\)\\)\\|c\\(?:oncat_null_yields_null\\|ursor_close_on_commit\\)\\|d\\(?:atef\\(?:\\(?:irs\\|orma\\)t\\)\\|eadlock_priority\\|isable_def_cnst_chk\\)\\|f\\(?:ips_flagger\\|mtonly\\|orceplan\\)\\|i\\(?:dentity_insert\\|mplicit_transactions\\)\\|l\\(?:anguage\\|ock_timeout\\)\\|n\\(?:o\\(?:count\\|exec\\)\\|umeric_roundabort\\)\\|offsets\\|parseonly\\|qu\\(?:ery_governor_cost_limit\\|oted_identifier\\)\\|r\\(?:emote_proc_transactions\\|owcount\\)\\|s\\(?:howplan_\\(?:all\\|text\\)\\|tatistics\\)\\|t\\(?:extsize\\|ransaction\\)\\|xact_abort\\)\\)\\)\\|go\\s-*\\|use\\s-+\\|setuser\\s-+\\|dbcc\\s-+\\).*$"
. font-lock-doc-face)
("\\b\\(a\\(?:bsolute\\|dd\\|l\\(?:l\\|ter\\)\\|n[dy]\\|sc?\\|uthorization\\|vg\\)\\|b\\(?:ackup\\|e\\(?:\\(?:gi\\|twee\\)n\\)\\|r\\(?:eak\\|owse\\)\\|ulk\\|y\\)\\|c\\(?:as\\(?:\\(?:cad\\)?e\\)\\|heck\\(?:point\\)?\\|l\\(?:ose\\|ustered\\)\\|o\\(?:alesce\\|l\\(?:late\\|umn\\)\\|m\\(?:mit\\(?:ted\\)?\\|pute\\)\\|n\\(?:firm\\|straint\\|t\\(?:ains\\(?:table\\)?\\|inue\\|rolrow\\)\\|vert\\)\\|unt\\)\\|r\\(?:eate\\|oss\\)\\|urrent\\(?:_\\(?:date\\|time\\(?:stamp\\)?\\|user\\)\\)?\\)\\|d\\(?:atabase\\|e\\(?:allocate\\|clare\\|fault\\|lete\\|ny\\|sc\\)\\|is\\(?:k\\|t\\(?:inct\\|ributed\\)\\)\\|ouble\\|rop\\|um\\(?:my\\|p\\)\\)\\|e\\(?:lse\\|nd\\|rr\\(?:lvl\\|orexit\\)\\|scape\\|x\\(?:cept\\|ec\\(?:ute\\)?\\|i\\(?:sts\\|t\\)\\)\\)\\|f\\(?:etch\\|i\\(?:l\\(?:e\\|lfactor\\)\\|rst\\)\\|loppy\\|or\\(?:eign\\)?\\|r\\(?:eetext\\(?:table\\)?\\|om\\)\\|u\\(?:ll\\|nction\\)\\)\\|g\\(?:oto\\|r\\(?:ant\\|oup\\)\\)\\|h\\(?:aving\\|oldlock\\)\\|i\\(?:dentity\\(?:_insert\\|col\\)?\\|n\\(?:dex\\|ner\\|sert\\|t\\(?:ersect\\|o\\)\\)\\|solation\\|[fns]\\)\\|join\\|k\\(?:ey\\|ill\\)\\|l\\(?:ast\\|e\\(?:ft\\|vel\\)\\|i\\(?:ke\\|neno\\)\\|oad\\)\\|m\\(?:ax\\|i\\(?:n\\|rrorexit\\)\\)\\|n\\(?:ational\\|ext\\|o\\(?:check\\|lock\\|nclustered\\|t\\)\\|ull\\(?:if\\)?\\)\\|o\\(?:ff\\(?:sets\\)?\\|n\\(?:ce\\|ly\\)\\|p\\(?:en\\(?:datasource\\|query\\|rowset\\|xml\\)?\\|tion\\)\\|rder\\|ut\\(?:er\\|put\\)\\|ver\\|[fnr]\\)\\|p\\(?:aglock\\|er\\(?:cent\\|m\\(?:anent\\)?\\)\\|ipe\\|lan\\|r\\(?:e\\(?:cision\\|pare\\)\\|i\\(?:mary\\|nt\\|or\\|vileges\\)\\|oc\\(?:e\\(?:dure\\|ssexit\\)\\)?\\)\\|ublic\\)\\|r\\(?:aiserror\\|e\\(?:ad\\(?:committed\\|past\\|text\\|uncommitted\\)?\\|configure\\|ferences\\|lative\\|p\\(?:eatable\\(?:read\\)?\\|lication\\)\\|st\\(?:ore\\|rict\\)\\|turns?\\|voke\\)\\|ight\\|o\\(?:llback\\|w\\(?:count\\|guidcol\\|lock\\)\\)\\|ule\\)\\|s\\(?:ave\\|chema\\|e\\(?:lect\\|rializable\\|ssion_user\\|t\\)\\|hutdown\\|ome\\|tatistics\\|um\\|ystem_user\\)\\|t\\(?:a\\(?:bl\\(?:e\\|ockx?\\)\\|pe\\)\\|e\\(?:mp\\(?:orary\\)?\\|xtsize\\)\\|hen\\|op?\\|r\\(?:an\\(?:saction\\)?\\|igger\\|uncate\\)\\|sequal\\)\\|u\\(?:n\\(?:committed\\|i\\(?:on\\|que\\)\\)\\|pd\\(?:ate\\(?:text\\)?\\|lock\\)\\|ser?\\)\\|v\\(?:alues\\|iew\\)\\|w\\(?:aitfor\\|h\\(?:e\\(?:n\\|re\\)\\|ile\\)\\|ith\\|ork\\|ritetext\\)\\)\\b"
. font-lock-keyword-face)
("\\b\\(@@\\(?:c\\(?:onnections\\|pu_busy\\|ursor_rows\\)\\|d\\(?:atefirst\\|bts\\)\\|error\\|fetch_status\\|i\\(?:d\\(?:entity\\|le\\)\\|o_busy\\)\\|l\\(?:ang\\(?:id\\|uage\\)\\|ock_timeout\\)\\|max_\\(?:connections\\|precision\\)\\|nestlevel\\|options\\|p\\(?:ack\\(?:_\\(?:received\\|sent\\)\\|et_errors\\)\\|rocid\\)\\|r\\(?:emserver\\|owcount\\)\\|s\\(?:erv\\(?:\\(?:er\\|ice\\)name\\)\\|pid\\)\\|t\\(?:extsize\\|imeticks\\|otal_\\(?:errors\\|read\\|write\\)\\|rancount\\)\\|version\\)\\|a\\(?:bs\\|cos\\|nd\\|pp_name\\|s\\(?:cii\\|in\\)\\|t\\(?:an\\|n2\\)\\|vg\\)\\|c\\(?:as[et]\\|eiling\\|har\\(?:index\\)?\\|o\\(?:alesce\\|l\\(?:_\\(?:length\\|name\\)\\|umnproperty\\)\\|n\\(?:tainstable\\|vert\\)\\|unt\\|[st]\\)\\|ur\\(?:rent_\\(?:timestamp\\|user\\)\\|sor_status\\)\\)\\|d\\(?:a\\(?:t\\(?:a\\(?:baseproperty\\|length\\)\\|e\\(?:add\\|diff\\|name\\|part\\)\\)\\|y\\)\\|b_\\(?:id\\|name\\)\\|egrees\\|ifference\\)\\|exp\\|f\\(?:ile\\(?:_\\(?:id\\|name\\)\\|group\\(?:_\\(?:id\\|name\\)\\|property\\)\\|property\\)\\|loor\\|ormatmessage\\|reetexttable\\|ulltext\\(?:\\(?:catalog\\|service\\)property\\)\\)\\|g\\(?:et\\(?:ansinull\\|date\\)\\|rouping\\)\\|host_\\(?:id\\|name\\)\\|i\\(?:dent\\(?:_\\(?:incr\\|seed\\)\\|ity\\)\\|ndex\\(?:_col\\|property\\)\\|s\\(?:_\\(?:\\(?:srvrole\\)?member\\)\\|date\\|nu\\(?:ll\\|meric\\)\\)\\)\\|l\\(?:e\\(?:ft\\|n\\)\\|o\\(?:g\\(?:10\\)?\\|wer\\)\\|trim\\)\\|m\\(?:ax\\|in\\|onth\\)\\|n\\(?:char\\|ewid\\|ullif\\)\\|o\\(?:bject\\(?:_\\(?:id\\|name\\)\\|property\\)\\|pen\\(?:query\\|rowset\\)\\)\\|p\\(?:a\\(?:rsename\\|tindex\\)\\|ermissions\\|i\\|ower\\)\\|quotename\\|r\\(?:a\\(?:dians\\|nd\\)\\|e\\(?:\\(?:pl\\(?:ac\\|icat\\)\\|vers\\)e\\)\\|ight\\|ound\\|trim\\)\\|s\\(?:ession_user\\|i\\(?:g?n\\)\\|oundex\\|pace\\|q\\(?:rt\\|uare\\)\\|t\\(?:ats_date\\|devp?\\|r\\|uff\\)\\|u\\(?:bstring\\|m\\|ser_\\(?:id\\|name\\|s\\(?:id\\|name\\)\\)\\)\\|ystem_user\\)\\|t\\(?:an\\|ext\\(?:ptr\\|valid\\)\\|ypeproperty\\)\\|u\\(?:nicode\\|pper\\|ser\\(?:_\\(?:id\\|name\\)\\)?\\)\\|varp?\\|year\\)\\b"
. font-lock-builtin-face)
("\\b@[a-zA-Z0-9_]*\\b" . font-lock-variable-name-face)
("\\b\\(bi\\(?:nary\\|t\\)\\|c\\(?:\\(?:ha\\(?:racte\\)?\\|urso\\)r\\)\\|d\\(?:atetime\\|ec\\(?:imal\\)?\\|ouble\\)\\|float\\|i\\(?:mage\\|nt\\(?:eger\\)?\\)\\|money\\|n\\(?:ational\\|char\\|text\\|umeric\\|varchar\\)\\|precision\\|real\\|small\\(?:datetime\\|int\\|money\\)\\|t\\(?:ext\\|i\\(?:mestamp\\|nyint\\)\\)\\|uniqueidentifier\\|var\\(?:binary\\|char\\|ying\\)\\)\\b"
. font-lock-type-face))
Documentation
Microsoft SQLServer SQL keywords used by font-lock.
This variable is used by sql-mode and sql-interactive-mode. The
regular expressions are created during compilation by calling the
function regexp-opt. Therefore, take a look at the source before
you define your own sql-mode-ms-font-lock-keywords.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defvar sql-mode-ms-font-lock-keywords
(eval-when-compile
(list
;; MS isql/osql Commands
(cons
(concat
"^\\(?:\\(?:set\\s-+\\(?:"
(regexp-opt '(
"datefirst" "dateformat" "deadlock_priority" "lock_timeout"
"concat_null_yields_null" "cursor_close_on_commit"
"disable_def_cnst_chk" "fips_flagger" "identity_insert" "language"
"offsets" "quoted_identifier" "arithabort" "arithignore" "fmtonly"
"nocount" "noexec" "numeric_roundabort" "parseonly"
"query_governor_cost_limit" "rowcount" "textsize" "ansi_defaults"
"ansi_null_dflt_off" "ansi_null_dflt_on" "ansi_nulls" "ansi_padding"
"ansi_warnings" "forceplan" "showplan_all" "showplan_text"
"statistics" "implicit_transactions" "remote_proc_transactions"
"transaction" "xact_abort"
)
t)
"\\)\\)\\|go\\s-*\\|use\\s-+\\|setuser\\s-+\\|dbcc\\s-+\\).*$")
'font-lock-doc-face)
;; MS Reserved
(sql-font-lock-keywords-builder 'font-lock-keyword-face nil
"absolute" "add" "all" "alter" "and" "any" "as" "asc" "authorization"
"avg" "backup" "begin" "between" "break" "browse" "bulk" "by"
"cascade" "case" "check" "checkpoint" "close" "clustered" "coalesce"
"column" "commit" "committed" "compute" "confirm" "constraint"
"contains" "containstable" "continue" "controlrow" "convert" "count"
"create" "cross" "current" "current_date" "current_time"
"current_timestamp" "current_user" "database" "deallocate" "declare"
"default" "delete" "deny" "desc" "disk" "distinct" "distributed"
"double" "drop" "dummy" "dump" "else" "end" "errlvl" "errorexit"
"escape" "except" "exec" "execute" "exists" "exit" "fetch" "file"
"fillfactor" "first" "floppy" "for" "foreign" "freetext"
"freetexttable" "from" "full" "goto" "grant" "group" "having"
"holdlock" "identity" "identity_insert" "identitycol" "if" "in"
"index" "inner" "insert" "intersect" "into" "is" "isolation" "join"
"key" "kill" "last" "left" "level" "like" "lineno" "load" "max" "min"
"mirrorexit" "national" "next" "nocheck" "nolock" "nonclustered" "not"
"null" "nullif" "of" "off" "offsets" "on" "once" "only" "open"
"opendatasource" "openquery" "openrowset" "option" "or" "order"
"outer" "output" "over" "paglock" "percent" "perm" "permanent" "pipe"
"plan" "precision" "prepare" "primary" "print" "prior" "privileges"
"proc" "procedure" "processexit" "public" "raiserror" "read"
"readcommitted" "readpast" "readtext" "readuncommitted" "reconfigure"
"references" "relative" "repeatable" "repeatableread" "replication"
"restore" "restrict" "return" "revoke" "right" "rollback" "rowcount"
"rowguidcol" "rowlock" "rule" "save" "schema" "select" "serializable"
"session_user" "set" "shutdown" "some" "statistics" "sum"
"system_user" "table" "tablock" "tablockx" "tape" "temp" "temporary"
"textsize" "then" "to" "top" "tran" "transaction" "trigger" "truncate"
"tsequal" "uncommitted" "union" "unique" "update" "updatetext"
"updlock" "use" "user" "values" "view" "waitfor" "when" "where"
"while" "with" "work" "writetext" "collate" "function" "openxml"
"returns"
)
;; MS Functions
(sql-font-lock-keywords-builder 'font-lock-builtin-face nil
"@@connections" "@@cpu_busy" "@@cursor_rows" "@@datefirst" "@@dbts"
"@@error" "@@fetch_status" "@@identity" "@@idle" "@@io_busy"
"@@langid" "@@language" "@@lock_timeout" "@@max_connections"
"@@max_precision" "@@nestlevel" "@@options" "@@pack_received"
"@@pack_sent" "@@packet_errors" "@@procid" "@@remserver" "@@rowcount"
"@@servername" "@@servicename" "@@spid" "@@textsize" "@@timeticks"
"@@total_errors" "@@total_read" "@@total_write" "@@trancount"
"@@version" "abs" "acos" "and" "app_name" "ascii" "asin" "atan" "atn2"
"avg" "case" "cast" "ceiling" "char" "charindex" "coalesce"
"col_length" "col_name" "columnproperty" "containstable" "convert"
"cos" "cot" "count" "current_timestamp" "current_user" "cursor_status"
"databaseproperty" "datalength" "dateadd" "datediff" "datename"
"datepart" "day" "db_id" "db_name" "degrees" "difference" "exp"
"file_id" "file_name" "filegroup_id" "filegroup_name"
"filegroupproperty" "fileproperty" "floor" "formatmessage"
"freetexttable" "fulltextcatalogproperty" "fulltextserviceproperty"
"getansinull" "getdate" "grouping" "host_id" "host_name" "ident_incr"
"ident_seed" "identity" "index_col" "indexproperty" "is_member"
"is_srvrolemember" "isdate" "isnull" "isnumeric" "left" "len" "log"
"log10" "lower" "ltrim" "max" "min" "month" "nchar" "newid" "nullif"
"object_id" "object_name" "objectproperty" "openquery" "openrowset"
"parsename" "patindex" "patindex" "permissions" "pi" "power"
"quotename" "radians" "rand" "replace" "replicate" "reverse" "right"
"round" "rtrim" "session_user" "sign" "sin" "soundex" "space" "sqrt"
"square" "stats_date" "stdev" "stdevp" "str" "stuff" "substring" "sum"
"suser_id" "suser_name" "suser_sid" "suser_sname" "system_user" "tan"
"textptr" "textvalid" "typeproperty" "unicode" "upper" "user"
"user_id" "user_name" "var" "varp" "year"
)
;; MS Variables
'("\\b@[a-zA-Z0-9_]*\\b" . font-lock-variable-name-face)
;; MS Types
(sql-font-lock-keywords-builder 'font-lock-type-face nil
"binary" "bit" "char" "character" "cursor" "datetime" "dec" "decimal"
"double" "float" "image" "int" "integer" "money" "national" "nchar"
"ntext" "numeric" "numeric" "nvarchar" "precision" "real"
"smalldatetime" "smallint" "smallmoney" "text" "timestamp" "tinyint"
"uniqueidentifier" "varbinary" "varchar" "varying"
)))
"Microsoft SQLServer SQL keywords used by font-lock.
This variable is used by `sql-mode' and `sql-interactive-mode'. The
regular expressions are created during compilation by calling the
function `regexp-opt'. Therefore, take a look at the source before
you define your own `sql-mode-ms-font-lock-keywords'.")