为了账号安全,请及时绑定邮箱和手机立即绑定

以下内容是关于sql insert into 语句使用的求助

以下内容是关于sql insert into 语句使用的求助

眼眸繁星 2022-04-08 17:07:20
向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')
)

查看完整回答
反对 回复 2022-04-11
  • 1 回答
  • 0 关注
  • 174 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号