Solved

Can keys be defined to a View

Posted on 2011-09-23
2
172 Views
Last Modified: 2012-05-12
Can keys be defined to a View?
0
Comment
Question by:HLRosenberger
2 Comments
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
ID: 36588545
Sort of.  You can create an indexed view with a unique, clustered index on it which would be similar to a primary key.  You cannot however create any kind of foreign key constraints to a view.  If you need that, it should be a table.  Also, note that there are a lot of requirements/restrictions to creating indexed views.  Here is info from BOL.

http://msdn.microsoft.com/en-us/library/ms191432.aspx

Greg

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 36598988
Thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now