--创建表TongXunLu
CREATE TABLE TongXunLu
(
[tName] nvarchar(30),
[tAddress] nvarchar(50),
[tEmail] varchar(50)
)
--创建表 students
CREATE TABLE students
(
[sId] int IDENTITY (1, 1) primary key NOT NULL ,
[sName] varchar (50) NOT NULL ,
[sAddress] varchar (50) default 'daxing' ,
[sEmail] varchar (50) check([sEmail] like '%@%') ,
[sSex] bit NOT NULL
)
insert into students (sname,saddress,semail,ssex) values ('张果老',default,'a@a',1)
insert into [students] (sname,saddress,semail,ssex) values ('李寻欢',null,'b@b',1)
insert into [students] (sname,saddress,semail,ssex) values ('令狐冲',default,'c@c',1)
insert into [students] (sname,saddress,semail,ssex) values ('程灵素',null,'d@f',0)
insert into [students] (sname,saddress,semail,ssex) values ('笑哈哈','beijing','e@e',0)
insert into [students] (sname,saddress,semail,ssex) values ('乐呵呵','neimenggu','f@f',1)
insert into [students] (sname,saddress,semail,ssex) values ('AAAAA',default,'a@a',1)
insert into [students] (sname,saddress,semail,ssex) values ('BBBBB',null,'b@b',1)
insert into [students] (sname,saddress,semail,ssex) values ('CCCCC',default,'c@c',1)
insert into [students] (sname,saddress,semail,ssex) values ('DDDDDD',null,'d@f',0)
insert into [students] (sname,saddress,semail,ssex) values ('EEEEE','beijing','e@e',0)
insert into [students] (sname,saddress,semail,ssex) values ('FFFFF','neimenggu','f@f',1)
insert into [students] (sname,saddress,semail,ssex) values ('GGGGGG',default,'a@a',1)
insert into [students] (sname,saddress,semail,ssex) values ('HHHHHH',null,'b@b',1)
insert into [students] (sname,saddress,semail,ssex) values ('IIIIII',default,'c@c',1)
insert into [students] (sname,saddress,semail,ssex) values ('JJJJJ',null,'d@f',0)
insert into [students] (sname,saddress,semail,ssex) values ('KKKKK','beijing','e@e',0)
insert into [students] (sname,saddress,semail,ssex) valu