I have a select statement which fetches 100 rows of data and inserts it in a table. However, I want to insert to insert 1
into the other column for all the rows I have inserted in the neighbouring column.
This is my insert select statement
insert into examination_data (ed_cs_id,ed_examination_id)
VALUES ((
select cs_id
from class_students
where cs_class_id = 1 AND cs_year_id = 1 ),1);
On running the query, I get this error
/* SQL Error (1242): Subquery returns more than 1 row */