Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does SSMS highlight the word UID as a keyword and what does it mean?

In SSMS, given the following statement,

enter image description here

Why is the word UID highlighted as a keyword?

Secondly, what is UID (or uid)?

Does it relate to GUIDs or User IDs or ...?

According to this answer and SQL Servers latest T-SQL reserve keyword documentation, it's not a reserved keyword. So why is it highlighted in blue?

And in case your wondering why there's no red syntax error highlighting beneath the word UID, like so:

enter image description here

... in the the first image above, it's because I'm selecting an existing column named "UID" from a table in a 3rd-party SQL Server database, whose architect(s) chose to name all tables' primary key columns "UID".

like image 366
katzbatz Avatar asked Sep 20 '25 08:09

katzbatz


1 Answers

At least for Azure Data Studio(which is a newer product than SSMS):

sql.tmLanguage.json: uid is under section "name": "keyword.other.sql"

The provided list is much broader than the one available at: Reserved Keywords (Transact-SQL) and contains values like: lineage_80_to_100, kilobytes_per_batch, ...

like image 125
Lukasz Szozda Avatar answered Sep 22 '25 02:09

Lukasz Szozda