Views [Production].[vProductAndDescription]
Product names and descriptions. Product descriptions are provided in multiple languages.
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
ANSI Nulls OnTrue
Quoted Identifier OnTrue
Schema BoundTrue
Created13:14:55 14 marca 2012
Last Modified13:14:55 14 marca 2012
KeyNameData TypeMax Length (Bytes)
Cluster Key IX_vProductAndDescription: CultureID\ProductIDProductIDint4
Name[dbo].[Name]100
ProductModel[dbo].[Name]100
Cluster Key IX_vProductAndDescription: CultureID\ProductIDCultureIDnchar(6)12
Descriptionnvarchar(400)800
KeyNameKey ColumnsUniqueDescription
Cluster Key IX_vProductAndDescription: CultureID\ProductIDIX_vProductAndDescriptionCultureID, ProductID
True
Clustered index on the view vProductAndDescription.

CREATE VIEW [Production].[vProductAndDescription]
WITH SCHEMABINDING
AS
-- View (indexed or standard) to display products and product descriptions by language.
SELECT
   p.[ProductID]
   ,p.[Name]
   ,pm.[Name] AS [ProductModel]
   ,pmx.[CultureID]
   ,pd.[Description]
FROM [Production].[Product] p
   INNER JOIN [Production].[ProductModel] pm
   ON p.[ProductModelID] = pm.[ProductModelID]
   INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx
   ON pm.[ProductModelID] = pmx.[ProductModelID]
   INNER JOIN [Production].[ProductDescription] pd
   ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];
GO
CREATE UNIQUE CLUSTERED INDEX [IX_vProductAndDescription] ON [Production].[vProductAndDescription] ([CultureID], [ProductID]) ON [PRIMARY]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Product names and descriptions. Product descriptions are provided in multiple languages.', 'SCHEMA', N'Production', 'VIEW', N'vProductAndDescription', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Clustered index on the view vProductAndDescription.', 'SCHEMA', N'Production', 'VIEW', N'vProductAndDescription', 'INDEX', N'IX_vProductAndDescription'
GO