SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Link](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](30) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Link_link_name]  DEFAULT (''),
	[url] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Link_link_url]  DEFAULT (''),
	[intro] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Link_intro]  DEFAULT (''),
	[target] [bit] NOT NULL,
	[logourl] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Link_link_logourl]  DEFAULT (''),
	[orderid] [int] NOT NULL CONSTRAINT [DF_Link_link_order]  DEFAULT ((0)),
	[click] [int] NOT NULL CONSTRAINT [DF_Link_click]  DEFAULT ((0)),
	[addtime] [datetime] NOT NULL,
	[updatetime] [datetime] NOT NULL,
 CONSTRAINT [PK_Link] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(主键)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'id'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(链接名称)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(链接Url)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'url'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(站点说明l)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'intro'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(是否新窗口,1为是)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'target'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(Logo链接地址)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'logourl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(排序号)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'orderid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(点击数)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'click'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(添加时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接-记录表(最后更新时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Link', @level2type=N'COLUMN', @level2name=N'updatetime'
