Link Search Menu Expand Document

sp_helpme

sp_helpme medkit logo

Purpose

An drop-in modern alternative to sp_help.

Changes from the original include:

  • Preferring printed messages over empty result sets for non-applicable data
  • Including extended properties wherever possible
  • Including create, modify, and more metadata about objects
  • Referenced views are returned in two-part naming convention

Arguments

ParameterTypeOutputDescription
@ObjectNameSYSNAME(256)noTarget object. Default is all objects.
@ExtendedPropertyNameSYSNAME(256)noKey for extended properties on objects. Default is ‘Description’.
@SqlMajorVersionTINYINTnoUsed for unit testing purposes only.
@SqlMinorVersionSMALLINTnoUsed for unit testing purposes only.

Usage

Basic example:

EXEC dbo.sp_helpme 'Sales.Invoices';

Output

For [Sales].[Invoices] in WideWorldImporters:

sp_helpme output