码迷,mamicode.com
首页 > 其他好文 > 详细

产品分类表

时间:2014-08-27 12:27:37      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:des   io   for   ar   sp   时间   on   ad   ef   

CREATE TABLE [dbo].[GoodsCategories](
    [ID] [int] NOT NULL,
    [ClassName] [nvarchar](20) NOT NULL,
    [ParentID] [int] NOT NULL,
    [Depth] [int] NOT NULL,
    [RootID] [int] NOT NULL,
    [Orders] [int] NOT NULL,
    [ParentIDPath] [nvarchar](max) NOT NULL,
    [AddTime] [datetime] NOT NULL,
    [ParentNamePath] [nvarchar](max) NOT NULL,
 CONSTRAINT [PK_GoodsCategories] PRIMARY KEY CLUSTERED
(
    [ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

ALTER TABLE [dbo].[GoodsCategories] ADD  CONSTRAINT [DF_GoodsCategories_Depth]  DEFAULT ((0)) FOR [Depth]
GO

ALTER TABLE [dbo].[GoodsCategories] ADD  CONSTRAINT [DF_GoodsCategories_AddTime]  DEFAULT (getdate()) FOR [AddTime]
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘主键‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @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‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘ClassName‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘父ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘ParentID‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘深度‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘Depth‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘分类的根节点‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘RootID‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘排序‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘Orders‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘父ID路径‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘ParentIDPath‘
GO

EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘添加时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘GoodsCategories‘, @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‘GoodsCategories‘, @level2type=N‘COLUMN‘,@level2name=N‘ParentNamePath‘
GO

产品分类表

标签:des   io   for   ar   sp   时间   on   ad   ef   

原文地址:http://www.cnblogs.com/zhangweixin/p/3938885.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!