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

CREATE TABLE [Shippers] (
ShipperID    int IDENTITY (1, 1) NOT NULL,   -- 运货商ID
CompanyName  nvarchar(40) NOT NULL,          -- 公司名称
Phone        nvarchar(24) NULL               -- 电话

CONSTRAINT [PK_Shippers] PRIMARY KEY CLUSTERED ([ShipperID])
)
--添加表注释
exec sp_addextendedproperty N'MS_Description', N'运货商', N'user', N'dbo', N'table', N'Shippers'

--添加列注释
exec sp_addextendedproperty N'MS_Description', N'运货商ID', N'user', N'dbo', N'table', N'Shippers', N'column', N'ShipperID'
exec sp_addextendedproperty N'MS_Description', N'公司名称', N'user', N'dbo', N'table', N'Shippers', N'column', N'CompanyName'
exec sp_addextendedproperty N'MS_Description', N'电话', N'user', N'dbo', N'table', N'Shippers', N'column', N'Phone'
