sql一些命令

1、创建表

create table tSId
(
   tSid int identity(1,1) primary key,
   tSName varchar(10) check(len(tSName)>2),
   tSGender char(2) default('男'),
   tSAddress varchar(50) null,
   tSPhone char(11) null,
   tSAge int chect(tSAge>18 and tSAge<60),
   tSBirthay date not null,
   tSCardld varchar(18) not null,
   tClassId int foreign key references TblClass(TClassId)              
)

 2、插入

insert into Users(UserName,UserPwd) values('ccc',123456)

  

原文地址:https://www.cnblogs.com/TaoYuanJieYi/p/5352248.html