麻烦大家帮忙一下!!!!!!!!!!!!!!!!!!!!!!!!!

huizai123 huizai123 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
麻烦大家帮忙一下!!
use test
go
create table student
(s_id char(3) not null primary key,
name char(20),
sex char(1),
class integer,
Term integer)
go

create table course
(c_id char(4) not null primary key,
c_name char(20),
note char(20))
go
create table score
(s_id char(3) not null
references student(s_id),
c_id char(4) not null
references course(c_id),
score_val integer,
primary key(s_id,c_id))
go
insert into student values('001','Liu','M',1,2)
insert into student values('002','Zhang','F',2,1)
insert into student values('003','Li','M',3,2)
insert into student values('004','Chen','F',4,1)
go
insert into course values('1001','语文','学生成绩信息')
insert into course values('1002','数学','学生成绩信息')
insert into course values('1003','英语','学生成绩信息')
go
drop table score
insert into score values('001','1003',98)
insert into score values('004','1001',60)
insert into score values('003','1002',66)---这条语句为什么插不进呢??
select*from score
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
huizai123
MS-SQL Server 34,876 成员 254,635 内容