序号 | 列名 | 数据类型 | 长度 | 小数位 | 标识 | 主键 | 外键 | 允许空 | 默认值 | 说明 |
1 | Qid | int | 4 | 0 | 是 | 是 | 否 | 主键 | ||
2 | Surveyid | int | 4 | 0 | 否 | 问卷的ID | ||||
3 | Typeid | int | 4 | 0 | 是 | 1 | 问题类型ID | |||
4 | Qtitle | nvarchar | 500 | 0 | 是 | 问题题目 | ||||
5 | Qcontent | text | 16 | 0 | 是 | 问题设定内容 | ||||
6 | Orderid | int | 4 | 0 | 是 | 0 | 排序ID | |||
7 | QuestionCreateTime | datetime | 8 | 3 | 是 | getdate | 创建时间 | |||
8 | IsNull | bit | 1 | 0 | 是 | 是否为空 | ||||
9 | Qoption | nvarchar | 4000 | 0 | 是 | 该问题的设定与规则,用于前端输出 |
问答表
GO
CREATE TABLE [dbo].[ZL_Question](
[Qid] [int] IDENTITY(1,1) NOT NULL,
[Surveyid] [int] NOT NULL,
[Typeid] [int] NULL CONSTRAINT [DF_ZL_Question_Typeid] DEFAULT (1),
[Qtitle] [nvarchar](500) NULL,
[Qcontent] [text] NULL,
[Orderid] [int] NULL CONSTRAINT [DF_ZL_Question_Orderid] DEFAULT (0),
[QuestionCreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Question_QuestionCreateTime] DEFAULT (getdate()),
[IsNull] [bit] Null,
[Qoption] [nvarchar](4000) NULL,
CONSTRAINT [PK_ZL_Question] PRIMARY KEY CLUSTERED
(
[Qid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
detele from ZL_Question
drop table ZL_Question
TRUNCATE table ZL_Question