Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 2.49 KB

File metadata and controls

75 lines (50 loc) · 2.49 KB
title Delete Check Constraints | Microsoft Docs
ms.custom
ms.date 06/28/2017
ms.prod sql
ms.prod_service database-engine, sql-database
ms.reviewer
ms.technology table-view-index
ms.topic conceptual
helpviewer_keywords
removing constraints
CHECK constraints, deleting
constraints [SQL Server], deleting
constraints [SQL Server], check
deleting constraints
ms.assetid 5f86c1a6-f5fa-4e77-a892-f6ae96fc0ab3
author stevestein
ms.author sstein
monikerRange =azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current

Delete Check Constraints

[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx-md]

You can delete a check constraint in [!INCLUDEssCurrent] by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql]. Deleting check constraints removes the limitations on data values that are accepted in the column or columns included in the constraint expression.

In This Topic

Before You Begin

Security

Permissions

Requires ALTER permission on the table.

Using SQL Server Management Studio

To delete a check constraint

  1. In Object Explorer, expand the table with the check constraint.

  2. Expand Constraints.

  3. Right-click the constraint and click Delete.

  4. In the Delete Object dialog box, click OK.

Using Transact-SQL

To delete a check constraint

  1. In Object Explorer, connect to an instance of [!INCLUDEssDE].

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    ALTER TABLE dbo.DocExc   
    DROP CONSTRAINT CHK_ColumnD_DocExc;  
    GO  
    

For more information, see ALTER TABLE (Transact-SQL).