Pages

Saturday, September 27, 2008

Constraint Information in SQL Server

In next couple of posts i will explain about some very usefull stored procedures in SQL Server.

SP_HELPCONSTRAINT: SP_HELPCONSTRAINTS [TABLE]

The sp_helpconstraint stored procedure is used to display information about the constraints created on the columns based on the input parameter. Constraint information contains type, name, delete action, update action, and status of constraints.


The below sample code displays the constraints information on Employee Table.

USE Pubs;
GO
EXEC sp_helpconstraint 'HR.Employees';
GO

No comments: