MySQL错误1241:操作数应包含1列
作者:互联网
我试图将table1中的数据插入table2
insert into table2(Name,Subject,student_id,result)
select (Name,Subject,student_id,result)
from table1;
table2的关键是student_id.
假设没有任何重复.
我收到错误:MySQL错误1241:操作数应包含1列
table2中只有四列.
解决方法:
语法错误,从select中删除().
insert into table2 (name, subject, student_id, result)
select name, subject, student_id, result
from table1;
标签:sql,mysql,select,insert,mysql-error-1241 来源: https://codeday.me/bug/20190925/1815852.html