Below is my mysql Query:
CREATE TEMPORARY TABLE temp_user_Details (
user_id INT(10) NOT NULL,
user_name NVARCHAR(100) NOT NULL,
user_email NVARCHAR(100) NOT NULL
);
INSERT INTO temp_user_Details (user_id, user_name, user_email)
(SELECT user_id, CONCAT(first_name," ",last_name) AS UserName, email
FROM users WHERE reportingManager = "abcd");
I am getting the following error:
Error Code: 1242.
Subquery returns more than 1 row.
I am no able to understand what exaclty is the error as in users
table user_id
column is primary key and auto incremental.