DEFINITION not in blue

in sql 2005, when i type VIEW DEFINITION , view is in blue but DEFINITION is not. so for some reason i thought i did not get the right syntax..

why does it now highlight it?
Who is Participating?
Kevin CrossConnect With a Mentor Chief Technology OfficerCommented:

In this case, I believe what you are seeing is VIEW DEFINITION is a permission you can grant. Permissions probably do not highlight in blue. Coincidentally, most permissions are also keywords like VIEW, SELECT, etc. Keywords get highlighted in blue. DEFINITION is not really a keyword by itself. It only has meaning the context of VIEW ANY DEFINITION or VIEW DEFINITION as the subject of a GRANT or DENY.

Does that make sense?
LIONKINGConnect With a Mentor Commented:
I think it's because VIEW is a SQL object name, therefore it highlights it to help you notice the keyword. Unlike definition, which is not a key/reserved word. It's like when you type connect, which is also a permission name, it doesn't highlight it as a keyword.

Hope that helps a bit...
25112Author Commented:
OK, the words "Permissions" itself is in pink..

is there documentation on what diff colors mean?
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

LIONKINGConnect With a Mentor Commented:
I think you can check them in options > Environment > Fonts and Colors.

Hope I got that right...
Kevin CrossChief Technology OfficerCommented:
That is a good question. I really hadn't looked for any documentation before, so let me check.

- GREEN: multi-line /* comments */ or single line -- comment
- RED: literal strings
- BLUE: reserved words, some other keywords like ANY | ALL are gray, PERMISSIONS pink ...

I will see if I can find the document that states that, though.
Kevin CrossConnect With a Mentor Chief Technology OfficerCommented:
Good call LIONKING, I didn't see your post until just now. That is right.

It is definitely under:
Tools > Options... > Environment > Fonts and Colors

I found the MSDN also:
25112Author Commented:
you were quick and to the point. thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.