For example, I have a users table, and waitingUsers table:
They work like this:
`Users`:
id
name
and
`WaitingUsers`:
id
user_id
Both Users and WaitingUsers‘s id is auto increment.
I would like to have one PROCEDURE to create the users, and the new id is generated after the users is created, and use it inserts into waitingUsers. How can I do so? Thanks.
try this one,
or