create table test (
id int primary key,
first_name varchar(20),
last_name varchar(30)
);
create table ref1 (
id int primary key,
test_id int references test(id)
);
SELECT * FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` WHERE REFERENCED_TABLE_NAME = 'test';