Answer the question
In order to leave comments, you need to log in
How to set a key in a view?
I connect two tables in representation in both tables there are keys. How to set a key in a specific column in a view?
Answer the question
In order to leave comments, you need to log in
You need a materialized view, i.e. first create a cluster key on the view, then the desired key, you can combine this in one action.
Here about it:
https://msdn.microsoft.com/ru-ru/library/ms191432.aspx
But it is worth considering the pitfalls, for example, when updating one table, the view will also be updated. It will also not be so easy to change the structure of the tables that will be used in this view. There is more at the link above.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question