SQL INSERT INTO SELECT的用法

INSERT INTO sc select sno, 3, (select avg(score) from sc where cno = 2)
from student

where sno not in (select sno from sc where cno = 3);

下划线部分语句的查询结果插入表sc 插入条件是where部分

猜你喜欢

转载自blog.csdn.net/yilia_jia/article/details/82185321