How to use variable in MySql?

There is a small table consisting only of digits.

SET @TEMP := (SELECT group_concat(id) FROM world WHERE account=8);


Next, the variable @TEMP you want to use IN ().
IN (as far as I know) takes values separated by commas, so I used the group_concat(id). But in the end it returns only one value
April 19th 20 at 12:14
1 answer
April 19th 20 at 12:16
Solution
And here is the answer:
You can do without the variable and group_concat().
In IN (SELECT id FROM account WHERE world=8)

Find more questions by tags MySQL