select
tc.constraint_name,
kcu.column_name,
ccu.table_schema as foreign_table_schema,
ccu.table_name as foreign_table_name,
ccu.column_name as foreign_column_name
from information_schema.table_constraints tc
join information_schema.key_column_usage kcu
on kcu.constraint_name = tc.constraint_name
and kcu.constraint_schema = tc.constraint_schema
join information_schema.constraint_column_usage ccu
on ccu.constraint_name = tc.constraint_name
and ccu.constraint_schema = tc.constraint_schema
where tc.constraint_type = 'FOREIGN KEY'
and tc.table_schema = 'prod_line'
and tc.table_name = 'table_param_pl_warrant_period'
and kcu.column_name = 'hb_invest_profileid';