I have a Select Statement that fetches more than 1 data
set @name := select name from users;
Now I want to insert all of them with one Query
for example
insert into users2 (name , created) Values (@name , NOW())
it returns this error
Error Code: 1242
Subquery returns more than 1 row
is there any way to do this without a loop?