I am trying to create an event and its Do part I am inserting one row but before inserting it ... for its one column i am trying getting value from a select query and then trying to add that in insert query . can some one tell me ... what is wrong with the query.
CREATE EVENT test_event_04 ON SCHEDULE EVERY 1 MINUTE STARTS CURRENT_TIMESTAMP DO
INSERT INTO Exam_Triger(Questions,CAT_ID,TOPIC_ID,SCHEDULED_TYPE,UPDATE_USER,UPDATE_DT,CREATE_USER,CREATE_DT)
VALUES(id, 2,2,'Weekly','',curdate(),'',curdate())
select id
from (
select GROUP_CONCAT(id SEPARATOR ',')as id
from (
select id
from question_data
order by rand()
limit 4
)as ls
) as ps