insert into achievement(stuid,subid,score)
values(
select stuid from student where stuname = '小张',
select subid from subject where subname='C# 高级',
80
)
go
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
#2
好像执行。。不行,前面的insert into achievement(stuid)我改成了insert into achievement(stuid,subid,score)也不行
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
好像执行。。不行,前面的insert into achievement(stuid)我改成了insert into achievement(stuid,subid,score)也不行
select a.stuid, b.subid, 80 from student jion subject on
XXXXXX where a.stuname = '小张' and b.subname='C# 高级'
XXXXXX 这部分不知道怎么等了……
#8
try this,
insert into achievement(stuid,subid,score)
select
(select stuid from student where stuname = '小张') 'stuid',
(select subid from subject where subname='C# 高级') 'subid',
80 'score'
insert into achievement(stuid,subid,score)
select
(select stuid from student where stuname = '小张') 'stuid',
(select subid from subject where subname='C# 高级') 'subid',
80 'score'
版主大大威武。。。。可以,没问题。。。题目没错
#1
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
#2
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
好像执行。。不行,前面的insert into achievement(stuid)我改成了insert into achievement(stuid,subid,score)也不行
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
好像执行。。不行,前面的insert into achievement(stuid)我改成了insert into achievement(stuid,subid,score)也不行
insert into achievement(stuid)
select stuid from student where stuname = '小张'
union all
select subid from subject where subname='C# 高级'
union all
select '80'
好像执行。。不行,前面的insert into achievement(stuid)我改成了insert into achievement(stuid,subid,score)也不行
select a.stuid, b.subid, 80 from student jion subject on
XXXXXX where a.stuname = '小张' and b.subname='C# 高级'
XXXXXX 这部分不知道怎么等了……
#8
try this,
insert into achievement(stuid,subid,score)
select
(select stuid from student where stuname = '小张') 'stuid',
(select subid from subject where subname='C# 高级') 'subid',
80 'score'
insert into achievement(stuid,subid,score)
select
(select stuid from student where stuname = '小张') 'stuid',
(select subid from subject where subname='C# 高级') 'subid',
80 'score'