Go
if exists (select * from sysobjects where id = OBJECT_ID('[CustomerCustomerDemo]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) 
	DROP TABLE [CustomerCustomerDemo]
Go

CREATE TABLE [CustomerCustomerDemo] (
CustomerID      nchar NOT NULL,   -- 客户ID
CustomerTypeID  nchar NOT NULL    -- 客户类型ID

CONSTRAINT [PK_CustomerCustomerDemo] PRIMARY KEY CLUSTERED ([CustomerID])CONSTRAINT [PK_CustomerCustomerDemo] PRIMARY KEY CLUSTERED ([CustomerTypeID])
)
--添加表注释
exec sp_addextendedproperty N'MS_Description', N'客户测试', N'user', N'dbo', N'table', N'CustomerCustomerDemo'

--添加列注释
exec sp_addextendedproperty N'MS_Description', N'客户ID', N'user', N'dbo', N'table', N'CustomerCustomerDemo', N'column', N'CustomerID'
exec sp_addextendedproperty N'MS_Description', N'客户类型ID', N'user', N'dbo', N'table', N'CustomerCustomerDemo', N'column', N'CustomerTypeID'
