August 8, 2012 at 5:30 am
Hi guys
Can we create Primary_Key Constraints on the View?
If Not Is there any other solution for this to get Sequences??
August 8, 2012 at 5:37 am
Your question is a bit vague. Primary Keys and Sequences don't have much to do with one another.
Are you talking about adding the equivalent of an IDENTITY column to a view?
You could take a look at the ROW_NUMBER() function - you'd want to make sure that your ordering columns are unique and unchanging or the row number values may change between multiple selects...
August 8, 2012 at 6:55 am
You can create a UNIQUE INDEX on a view.
I don't understand how sequences relate to this topic, though. Can you clarify please?
-- Gianluca Sartori
August 8, 2012 at 8:24 am
farooq.hbs (8/8/2012)
Hi guysCan we create Primary_Key Constraints on the View?
If Not Is there any other solution for this to get Sequences??
Please read the following, it discusses Indexed Views:
http://msdn.microsoft.com/en-us/library/ms191432(v=sql.100).aspx
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply