Solved

DEFINITION not in blue

Posted on 2011-09-15
7
330 Views
Last Modified: 2012-05-12
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
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 250 total points
ID: 36544470
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
 
LVL 13

Assisted Solution

by:LIONKING
LIONKING earned 250 total points
ID: 36544508
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
 
LVL 5

Author Comment

by:25112
ID: 36544713
OK, the words "Permissions" itself is in pink..

is there documentation on what diff colors mean?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Assisted Solution

by:LIONKING
LIONKING earned 250 total points
ID: 36544741
I think you can check them in options > Environment > Fonts and Colors.

Hope I got that right...
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36544775
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
 
LVL 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 250 total points
ID: 36544799
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
 
LVL 5

Author Comment

by:25112
ID: 36544991
you were quick and to the point. thanks.
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question