Source code SQL 2005 Adventure Works OLTP

Production.ProductSubcategory




CREATE TABLE [Production].[ProductSubcategory](
    [ProductSubcategoryID] [int] IDENTITY (1, 1) NOT NULL,
    [ProductCategoryID] [int] NOT NULL,
    [Name] [Name] NOT NULL,
    [rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_ProductSubcategory_rowguid] DEFAULT (NEWID()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_ProductSubcategory_ModifiedDate] DEFAULT (GETDATE())
) ON [PRIMARY];




ALTER TABLE [Production].[ProductSubcategory] WITH CHECK ADD
    CONSTRAINT [PK_ProductSubcategory_ProductSubcategoryID] PRIMARY KEY CLUSTERED
    (
        [ProductSubcategoryID]
    )  ON [PRIMARY];




ALTER TABLE [Production].[ProductSubcategory] ADD
    CONSTRAINT [FK_ProductSubcategory_ProductCategory_ProductCategoryID] FOREIGN KEY
    (
        [ProductCategoryID]
    ) REFERENCES [Production].[ProductCategory](
        [ProductCategoryID]
    );





EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Product subcategories. See ProductCategory table.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], NULL, NULL;
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Primary key for ProductSubcategory records.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'COLUMN', [ProductSubcategoryID];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Product category identification number. Foreign key to ProductCategory.ProductCategoryID.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'COLUMN', [ProductCategoryID];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Subcategory description.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'COLUMN', [Name];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'COLUMN', [rowguid];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Date and time the record was last updated.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'COLUMN', [ModifiedDate];



-- Triggers
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Address table to the current date.', N'SCHEMA', [Person], N'TABLE', [Address], N'TRIGGER', [uAddress];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the AddressType table to the current date.', N'SCHEMA', [Person], N'TABLE', [AddressType], N'TRIGGER', [uAddressType];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the AWBuildVersion table to the current date.', N'SCHEMA', [dbo], N'TABLE', [AWBuildVersion], N'TRIGGER', [uAWBuildVersion];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the BillOfMaterials table to the current date.', N'SCHEMA', [Production], N'TABLE', [BillOfMaterials], N'TRIGGER', [uBillOfMaterials];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Contact table to the current date.', N'SCHEMA', [Person], N'TABLE', [Contact], N'TRIGGER', [uContact];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ContactCreditCard table to the current date.', N'SCHEMA', [Sales], N'TABLE', [ContactCreditCard], N'TRIGGER', [uContactCreditCard];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ContactType table to the current date.', N'SCHEMA', [Person], N'TABLE', [ContactType], N'TRIGGER', [uContactType];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the CountryRegionCurrency table to the current date.', N'SCHEMA', [Sales], N'TABLE', [CountryRegionCurrency], N'TRIGGER', [uCountryRegionCurrency];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the CountryRegion table to the current date.', N'SCHEMA', [Person], N'TABLE', [CountryRegion], N'TRIGGER', [uCountryRegion];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the CreditCard table to the current date.', N'SCHEMA', [Sales], N'TABLE', [CreditCard], N'TRIGGER', [uCreditCard];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Culture table to the current date.', N'SCHEMA', [Production], N'TABLE', [Culture], N'TRIGGER', [uCulture];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Currency table to the current date.', N'SCHEMA', [Sales], N'TABLE', [Currency], N'TRIGGER', [uCurrency];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the CurrencyRate table to the current date.', N'SCHEMA', [Sales], N'TABLE', [CurrencyRate], N'TRIGGER', [uCurrencyRate];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Customer table to the current date.', N'SCHEMA', [Sales], N'TABLE', [Customer], N'TRIGGER', [uCustomer];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the CustomerAddress table to the current date.', N'SCHEMA', [Sales], N'TABLE', [CustomerAddress], N'TRIGGER', [uCustomerAddress];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Department table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [Department], N'TRIGGER', [uDepartment];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Document table to the current date.', N'SCHEMA', [Production], N'TABLE', [Document], N'TRIGGER', [uDocument];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'INSTEAD OF DELETE trigger which keeps Employees from being deleted.', N'SCHEMA', [HumanResources], N'TABLE', [Employee], N'TRIGGER', [dEmployee];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Employee table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [Employee], N'TRIGGER', [uEmployee];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the EmployeeAddress table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [EmployeeAddress], N'TRIGGER', [uEmployeeAddress];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the EmployeeDepartmentHistory table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [EmployeeDepartmentHistory], N'TRIGGER', [uEmployeeDepartmentHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the EmployeePayHistory table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [EmployeePayHistory], N'TRIGGER', [uEmployeePayHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Illustration table to the current date.', N'SCHEMA', [Production], N'TABLE', [Illustration], N'TRIGGER', [uIllustration];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Individual table to the current date.', N'SCHEMA', [Sales], N'TABLE', [Individual], N'TRIGGER', [iuIndividual];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the JobCandidat table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [JobCandidate], N'TRIGGER', [uJobCandidate];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Location table to the current date.', N'SCHEMA', [Production], N'TABLE', [Location], N'TRIGGER', [uLocation];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Product table to the current date.', N'SCHEMA', [Production], N'TABLE', [Product], N'TRIGGER', [uProduct];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductCategory table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductCategory], N'TRIGGER', [uProductCategory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductCostHistory table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductCostHistory], N'TRIGGER', [uProductCostHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductDescription table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductDescription], N'TRIGGER', [uProductDescription];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductDocument table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductDocument], N'TRIGGER', [uProductDocument];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductInventory table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductInventory], N'TRIGGER', [uProductInventory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductListPriceHistory table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductListPriceHistory], N'TRIGGER', [uProductListPriceHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductModel table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductModel], N'TRIGGER', [uProductModel];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductModelIllustration table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductModelIllustration], N'TRIGGER', [uProductModelIllustration];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductModelProductDescriptionCulture table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductModelProductDescriptionCulture], N'TRIGGER', [uProductModelProductDescriptionCulture];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductPhoto table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductPhoto], N'TRIGGER', [uProductPhoto];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductProductPhoto table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductProductPhoto], N'TRIGGER', [uProductProductPhoto];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductReview table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductReview], N'TRIGGER', [uProductReview];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductSubcategory table to the current date.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'TRIGGER', [uProductSubcategory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ProductVendor table to the current date.', N'SCHEMA', [Purchasing], N'TABLE', [ProductVendor], N'TRIGGER', [uProductVendor];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER INSERT trigger that inserts a row in the TransactionHistory table and updates the PurchaseOrderHeader.SubTotal column.', N'SCHEMA', [Purchasing], N'TABLE', [PurchaseOrderDetail], N'TRIGGER', [iPurchaseOrderDetail];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column.', N'SCHEMA', [Purchasing], N'TABLE', [PurchaseOrderDetail], N'TRIGGER', [uPurchaseOrderDetail];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the PurchaseOrderHeader table.', N'SCHEMA', [Purchasing], N'TABLE', [PurchaseOrderHeader], N'TRIGGER', [uPurchaseOrderHeader];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column.', N'SCHEMA', [Sales], N'TABLE', [SalesOrderDetail], N'TRIGGER', [iduSalesOrderDetail];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the SalesOrderHeader table.Updates the SalesYTD column in the SalesPerson and SalesTerritory tables.', N'SCHEMA', [Sales], N'TABLE', [SalesOrderHeader], N'TRIGGER', [uSalesOrderHeader];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesOrderHeaderSalesReason table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesOrderHeaderSalesReason], N'TRIGGER', [uSalesOrderHeaderSalesReason];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesPerson table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesPerson], N'TRIGGER', [uSalesPerson];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesPersonQuotaHistory table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesPersonQuotaHistory], N'TRIGGER', [uSalesPersonQuotaHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesReason table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesReason], N'TRIGGER', [uSalesReason];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesTaxRate table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesTaxRate], N'TRIGGER', [uSalesTaxRate];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritory table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesTerritory], N'TRIGGER', [uSalesTerritory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritoryHistory table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SalesTerritoryHistory], N'TRIGGER', [uSalesTerritoryHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ScrapReason table to the current date.', N'SCHEMA', [Production], N'TABLE', [ScrapReason], N'TRIGGER', [uScrapReason];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Shift table to the current date.', N'SCHEMA', [HumanResources], N'TABLE', [Shift], N'TRIGGER', [uShift];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ShipMethod table to the current date.', N'SCHEMA', [Purchasing], N'TABLE', [ShipMethod], N'TRIGGER', [uShipMethod];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the ShoppingCartItem table to the current date.', N'SCHEMA', [Sales], N'TABLE', [ShoppingCartItem], N'TRIGGER', [uShoppingCartItem];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SpecialOffer table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SpecialOffer], N'TRIGGER', [uSpecialOffer];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the SpecialOfferProduct table to the current date.', N'SCHEMA', [Sales], N'TABLE', [SpecialOfferProduct], N'TRIGGER', [uSpecialOfferProduct];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the StateProvince table to the current date.', N'SCHEMA', [Person], N'TABLE', [StateProvince], N'TRIGGER', [uStateProvince];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table.', N'SCHEMA', [Sales], N'TABLE', [Store], N'TRIGGER', [iStore];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Store table to the current date.', N'SCHEMA', [Sales], N'TABLE', [Store], N'TRIGGER', [uStore];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the StoreContact table to the current date.', N'SCHEMA', [Sales], N'TABLE', [StoreContact], N'TRIGGER', [uStoreContact];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistory table to the current date.', N'SCHEMA', [Production], N'TABLE', [TransactionHistory], N'TRIGGER', [uTransactionHistory];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistoryArchive table to the current date.', N'SCHEMA', [Production], N'TABLE', [TransactionHistoryArchive], N'TRIGGER', [uTransactionHistoryArchive];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the UnitMeasure table to the current date.', N'SCHEMA', [Production], N'TABLE', [UnitMeasure], N'TRIGGER', [uUnitMeasure];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'INSTEAD OF DELETE trigger which keeps Vendors from being deleted.', N'SCHEMA', [Purchasing], N'TABLE', [Vendor], N'TRIGGER', [dVendor];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the Vendor table to the current date.', N'SCHEMA', [Purchasing], N'TABLE', [Vendor], N'TRIGGER', [uVendor];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the VendorAddress table to the current date.', N'SCHEMA', [Purchasing], N'TABLE', [VendorAddress], N'TRIGGER', [uVendorAddress];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the VendorContact table to the current date.', N'SCHEMA', [Purchasing], N'TABLE', [VendorContact], N'TRIGGER', [uVendorContact];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER INSERT trigger that inserts a row in the TransactionHistory table.', N'SCHEMA', [Production], N'TABLE', [WorkOrder], N'TRIGGER', [iWorkOrder];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table.', N'SCHEMA', [Production], N'TABLE', [WorkOrder], N'TRIGGER', [uWorkOrder];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'AFTER UPDATE trigger setting the ModifiedDate column in the WorkOrderRouting table to the current date.', N'SCHEMA', [Production], N'TABLE', [WorkOrderRouting], N'TRIGGER', [uWorkOrderRouting];



EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Unique nonclustered index.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'INDEX', [AK_ProductSubcategory_Name];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Unique nonclustered index.Used to support replication samples.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'INDEX', [AK_ProductSubcategory_rowguid];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Clustered index created by a primary key constraint.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'INDEX', [PK_ProductSubcategory_ProductSubcategoryID];



EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Primary key (clustered) constraint', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'CONSTRAINT', [PK_ProductSubcategory_ProductSubcategoryID];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Foreign key constraint referencing ProductCategory.ProductCategoryID.', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'CONSTRAINT', [FK_ProductSubcategory_ProductCategory_ProductCategoryID];
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Default constraint value of GETDATE()', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'CONSTRAINT', [DF_ProductSubcategory_ModifiedDate]; -- (GETDATE())
EXEC [sys].[sp_addextendedproperty] N'MS_Description', N'Default constraint value of NEWID()', N'SCHEMA', [Production], N'TABLE', [ProductSubcategory], N'CONSTRAINT', [DF_ProductSubcategory_rowguid]; -- (NEWID())
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.