T-SQL Tutorial

Msg 15252 Level 16 - The primary or foreign key table name must be given


On Transact SQL language the Msg 15252 Level 16 - The primary or foreign key table name must be given.

Msg 15252 Level 16 Example:

Invalid command:

USE tempdb;
GO
EXEC sp_fkeys
@pktable_owner = 'dbo';
GO

Message
Msg 15252, Level 16, State 1, Procedure sp_fkeys, Line 22
The primary or foreign key table name must be given.




Correct command:

USE tempdb;
GO
EXEC sp_fkeys
@pktable_name = 'DEPARTMENTS',
@pktable_owner = 'dbo';
GO

Other error messages: