T-SQL建库建表的同时加约束,调用DOS cmdshell命令建文件夹, if exists(select * from sysobjects where name ='Result') drop table Result create table Result ( ExamDate datetime default getdatet() not null, StudentResult int not null check(StudentResult>100 and StudentResult