Sales.Store Table

Information

NameStore
SchemaSales
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:56

Extended Properties

NameTypeProperty NameValue
StoreTABLEMS_DescriptionCustomers (resellers) of Adventure Works products.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   CustomerIDint  Sales.Customer.CustomerID
 
 
 
   Namenvarchar(50) SQL_Latin1_General_CP1_CI_AS 
 
 
 
   SalesPersonIDint  Sales.SalesPerson.SalesPersonID
 
 
 
   Demographicsxml   
 
 
 
   rowguiduniqueidentifier   
(newid())
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_Store_CustomerIDClustered  CustomerID
AK_Store_rowguidNonClustered  rowguid
IX_Store_SalesPersonIDNonClustered  SalesPersonID

Foreign Key Constraints

NameTypeReferenced Table
FK_Store_Customer_CustomerIDForeign keySales.Customer
FK_Store_SalesPerson_SalesPersonIDForeign keySales.SalesPerson

Triggers

NameActivates onInstead OfFor ReplicationEnabledCreatedModified
iStoreINSERT   29.3.2010. 21:58:5629.3.2010. 21:58:56

SQL Script

CREATE TABLE [Sales].[Store] (
    [CustomerID] int NOT NULL,
    [Name] nvarchar(50) NOT NULL,
    [SalesPersonID] int NULL,
    [Demographics] xml NULL,
    [rowguid] uniqueidentifier NOT NULL DEFAULT (newid()),
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE UNIQUE INDEX [AK_Store_rowguid] on [Sales].[Store]([rowguid]);
CREATE INDEX [IX_Store_SalesPersonID] on [Sales].[Store]([SalesPersonID]);