Hi! Could we please enable some services and cookies to improve your experience and our website?
CREATE TABLE table_1 (id int, array_id json);
INSERT INTO table_1
VALUES
(
1, '[1000003440,1000000356,1000000454]'
);
CREATE TABLE table_2 (id int);
INSERT INTO table_2
VALUES
(1000003440),
(1000000356),
(1000000454);
SELECT *
FROM table_1 T1
LEFT JOIN table_2 T2 ON JSON_CONTAINS(
array_id,
CAST(T2.`id` AS JSON),
'$'
);