现有表结构随意,增加三列,如下:
ProductID(uniqueidentifier)
ModuleID(uniqueidentifier)
QuestionType(int ,not null)1. ProductID,ModuleID都允许为空
2. QuestionType(问题类型)不允许为空
请问SQL语句该怎么写?
ProductID(uniqueidentifier)
ModuleID(uniqueidentifier)
QuestionType(int ,not null)1. ProductID,ModuleID都允许为空
2. QuestionType(问题类型)不允许为空
请问SQL语句该怎么写?
add ProductID uniqueidentifier
go
alter table tb
add ModuleID uniqueidentifier
go
alter table tb
add QuestionType int not null
alter table tb add ProductID int
alter table tb add ModuleID int
add QuestionType int not null
alter table tb add ModuleID uniqueidentifier
2、alter table tb add QuestionType int not null
1.物理表中已经有了记录,在此基础上做修改
2.QuestionType 默认为0