By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE table_T (T_id int);
INSERT INTO table_T VALUES (1),(2),(5),(10),(100);
SET @T_id := '1,2,10';
SELECT T_id FROM table_T;
T_id |
---|
1 |
2 |
5 |
10 |
100 |
SELECT T_id FROM table_T WHERE FIND_IN_SET(T_id,@T_id) > 0;
T_id |
---|
1 |
2 |
10 |