Solved

DEFINITION not in blue

Posted on 2011-09-15
7
328 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 59

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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 59

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 59

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

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!

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

740 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