- instructor(ID,name, dept_name,salary)
- student(ID,name, dept_name,credits)
如上两张表↑
- 我现在想将credits>=100的student添加到instructor中并将salary设置为30000
sql语句:
insert into instructor (id, name, dept_name, salary)
select id, name, dept_name, 30000
from student
where tot_cred >= 100