向Student表插入一条记录:该记录学号是“1080001”,姓名“李好”,性别与“1080002”相同,专业与“1080003”在同一专业,年龄与“1080005”相同;student表中字段分别是name,no,age,sex,major求问语句怎么写
1 回答

SMILET
TA贡献1796条经验 获得超4个赞
insert into student(name,no,age,sex,major) values('李好','1080001',
(select age from student where no='1080005'),
(select distinct sex from student where no='1080002'),
(select distinct major from student where no='1080003')
)
添加回答
举报
0/150
提交
取消