Returns primary and foreign key information for the specified table or tables. Foreign keys must be declared through the ANSI integrity constraint mechanism.
sp_fkeys pktable_name [, pktable_owner] [, pktable_qualifier] [, fktable_name] [, fktable_owner] [, fktable_qualifier]
is the name of the table containing the primary key. Wildcard-character search patterns are not supported. You must specify this parameter, the fktable_name parameter, or both.
is the owner of the table containing the primary key. Wildcard-character search patterns are not supported.
is ignored. Leave blank or set to NULL.
is the name of the table containing the foreign key. Wildcard-character search patterns are not supported. You must specify this parameter, the pktable_name parameter, or both.
is the owner of the table containing the foreign key. Wildcard-character search patterns are not supported.
is ignored. Leave blank or set to NULL.
This procedure corresponds to the ODBC function SQLForeignKeys.