SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table cars_krep ( id int, name varchar(64) ); insert into cars_krep values (1, 'Krep 1'), (2, 'Krep 2'), (5, 'Krep 5'); create table products ( id int, id_cars_krep json ); insert into products values (1, '{"id_krep":[1,2,4]}'), (2, '{"id_krep":[5,6]}'); select * from cars_krep join products on JSON_CONTAINS(id_cars_krep, JSON_ARRAY(cars_krep.id), '$.id_krep');

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear