表名:ZL_Comment












序号列名数据类型长度小数位标识主键外键允许空默认值说明
1CommentIDint40  主键ID
2GeneralIDint40    内容ID
3Titlenvarchar2550    评论的标题
4Contentsnvarchar3000    评论
5Auditedbit10   0是否审核
6UserIDint40     
7CommentTimedatetime83   getdate评论时间
8Scoreint40   0评论得分
9PKSbit10   00=反对 1=支持
10filesnvarchar2000    附件
11statusint40   0 
12pidint40   0父评论ID
13Typeint40   0评论类型
14ReprotIDSnvarchar10000   ''举报人

简要说明:

评论表

GO
CREATE TABLE [dbo].[ZL_Comment](
[CommentID] [int] IDENTITY(1,1) NOT NULL,
[GeneralID] [int] NOT NULL,
[Title] [nvarchar](255) NULL,
[Contents] [nvarchar](300) NOT NULL,
[Audited] [bit] NOT NULL CONSTRAINT [DF_ZL_Comment_Audited]  DEFAULT (0),
[UserID] [int] NOT NULL,
[CommentTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Comment_CommentTime]  DEFAULT (getdate()),
[Score] [int] NOT NULL CONSTRAINT [DF_ZL_Comment_Score]  DEFAULT (0),
[PKS] [bit] NULL CONSTRAINT [DF_ZL_Comment_PKS]  DEFAULT (0),
[files] [nvarchar](200) NULL,
[status] [int] NULL CONSTRAINT [DF_ZL_Comment_status]  DEFAULT (0),
[pid] [int] NULL CONSTRAINT [DF_ZL_Comment_pid]  DEFAULT (0),
[Type] [int] NULL CONSTRAINT [DF_ZL_Comment_Type]  DEFAULT (0),
[ReprotIDS] [nvarchar](1000) NOT NULL,
 CONSTRAINT [PK_ZL_Comment] PRIMARY KEY CLUSTERED
([CommentID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ZL_Comment] ADD  CONSTRAINT [DF_ZL_Comment_ReprotIDS]  DEFAULT ('') FOR [ReprotIDS]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论的标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Comment', @level2type=N'COLUMN', @level2name=N'Title'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0=反对 1=支持' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Comment', @level2type=N'COLUMN', @level2name=N'PKS'


--注意:将清空全表数据

detele from ZL_Comment

--注意:将删除整个表

drop table ZL_Comment

--注意:清空且复位表ID序列为初始值

TRUNCATE table ZL_Comment