Solved

DEFINITION not in blue

Posted on 2011-09-15
7
326 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

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.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

776 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