Reputation: 182
I have 2 table tab1 and tab2. In tab1 i am storing the user_id and quiz_id(quiz_id is primary key) and in the tab2 i want to store the question for the quiz where quiz_id is the same for user_id in second table
Upvotes: 0
Views: 51
Reputation: 204746
insert into tab2
(select quiz_id from tab1 where user_id = 123), ...
Upvotes: 1