I'm trying to insert data from one table into another. I would like to put the info from unit_66 in one column and the info for unit_166 into another column but I'm having trouble using two SELECT statements, I get this error when executing the code:
[Err] 1242 - Subquery returns more than 1 row
CREATE TABLE time_test (unit_66 BIGINT, unit_116 BIGINT);
insert into time_test (unit_66, unit_116)
VALUES
(
(select time_stamp from `events` where unit_id = 66 LIMIT 50),
(select time_stamp from `events` where unit_id = 116 LIMIT 50)
);
Can anyone tell what the problem it is?