MySQL error 1241: Operand should contain 1 column(s)
Syntax error, remove the ( ) from select. insert into table2 (name, subject, student_id, result) select name, subject, student_id, result from table1;
Syntax error, remove the ( ) from select. insert into table2 (name, subject, student_id, result) select name, subject, student_id, result from table1;
Your subquery is selecting two columns, while you are using it to project one column (as part of the outer SELECT clause). You can only select one column from such a query in this context. Consider joining to the users table instead; this will give you more flexibility when selecting what columns you want from … Read more