T-SQL Tutorial

Msg 201 Level 16 - Procedure or function sp_pkeys expects parameter table_name


On Transact SQL language the Msg 201 Level 16 - Procedure or function 'sp_pkeys' expects parameter '@table_name', which was not supplied.

Msg 201 Level 16 Example:

Invalid command:

USE tempdb;
GO
EXEC sp_pkeys
@table_qualifier = 'tempdb';
GO

Message
Msg 201, Level 16, State 4, Procedure sp_pkeys, Line 2
Procedure or function 'sp_pkeys' expects parameter '@table_name', which was not supplied.




Correct command:

USE tempdb;
GO
EXEC sp_pkeys
@table_name = 'departments',
@table_qualifier = 'tempdb';
GO

Other error messages: