根据约束名称获取约束信息

select cst.constraint_schema, cst.constraint_name,                 
       fk.table_name, fk.ordinal_position, fk.column_name,         
       pk.table_name, pk.column_name                               
  from qsys2.syscst cst join qsys2.syskeycst fk                   
      on fk.constraint_schema = cst.constraint_schema              
        and fk.constraint_name = cst.constraint_name               
    join qsys2.sysrefcst ref                                       
      on ref.constraint_schema = cst.constraint_schema             
        and ref.constraint_name = cst.constraint_name              
    join qsys2.syskeycst pk                                        
      on pk.constraint_schema = ref.unique_constraint_schema       
        and pk.constraint_name = ref.unique_constraint_name        
  where fk.ordinal_position = pk.ordinal_position                  
    and  cst.constraint_name        = 'CST NAME'                       

order by cst.constraint_schema, cst.constraint_name