want to fetch the records that contains at least one value from the array in ID column.

Copper Contributor

want to fetch the records that contains at least one value from the array in ID column.
while the array contains the keys of the JSON document stored in same table and the column name as Following set as JSON datatype

SELECT * FROM user WHERE CAST(ID AS CHAR) IN (SELECT JSON_KEYS(Following) FROM user WHERE ID = 1);
1 Reply
That's really to less on information.
Please post table design as DDL, some sample data as DML statement and the expected result.