欧的一天

create table student

(

  id int identity(1,1) primary key not mull,

  name varchar(20) not null,

  sex char(2) not default '男',

  cardNo varchar(18) not null check(len(cardNo)=15 or len(carNo)=18),

  class varchar(20) not null,

  teacher varchar(29) not null,

   inDate date not null default getdate()

)

create table score

扫描二维码关注公众号,回复: 6559492 查看本文章

(

  id int identity(1,1)not null primary key,

  math float not null,

  chinese float not null,

  english float not  null,

  schoolyear char(3) not null,

  studentId int foreign key references student(id) not null

)

insert into student values("张三",DEFAULT,‘49494809834’,'s34435543','ifjgn','2008-03-04')

insert into student values("李三",DEFAULT,‘49494809834’,'s34425643','龙老师','2009-06-04')

insert into student values("法三",DEFAULT,‘13455455554’,'s34415043','蓝老师','2007-03-04')

insert into student values("分三",DEFAULT,‘19494809834’,'s34465943','费老师','2008-08-04')

insert into student values("饿三",DEFAULT,‘29494809834’,'s34475743','帝老师','2006-03-04')

猜你喜欢

转载自www.cnblogs.com/l2760186162/p/11061159.html
今日推荐