• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

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?
0
25112
Asked:
25112
  • 3
  • 2
  • 2
4 Solutions
 
Kevin CrossChief Technology OfficerCommented:
Hi.

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?
0
 
LIONKINGCommented:
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...
0
 
25112Author Commented:
OK, the words "Permissions" itself is in pink..

is there documentation on what diff colors mean?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
LIONKINGCommented:
I think you can check them in options > Environment > Fonts and Colors.

Hope I got that right...
0
 
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.
0
 
Kevin CrossChief 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: http://msdn.microsoft.com/en-us/library/ms173443.aspx
0
 
25112Author Commented:
you were quick and to the point. thanks.
0
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.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now