I have a table which have two columns ADMI_ID and DIAG_ID.
|--------|--------|
|ADMI_ID |DIAG_ID |
|--------|--------|
| 1 | 46777 |
| 1 | 12457 |
| 2 | 12456 |
| 2 | 36835 |
|--------|--------|
I want to fetch this two separate DIAG_ID responding to the same ADMI_ID and store them in a variable in mysql stored procedure or insert them into a temporary table. Can you please help me ?