You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can delete a check constraint in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Deleting check constraints removes the limitations on data values that are accepted in the column or columns included in the constraint expression.
28
-
29
-
**In This Topic**
30
-
31
-
-**Before you begin:**
32
-
33
-
[Security](#Security)
34
-
35
-
-**To delete a check constraint, using:**
36
-
37
-
[SQL Server Management Studio](#SSMSProcedure)
38
-
39
-
[Transact-SQL](#TsqlProcedure)
40
-
41
-
## <aname="BeforeYouBegin"></a> Before You Begin
42
-
43
-
### <aname="Security"></a> Security
44
-
45
-
#### <aname="Permissions"></a> Permissions
46
-
Requires ALTER permission on the table.
47
-
48
-
## <aname="SSMSProcedure"></a> Using SQL Server Management Studio
49
-
50
-
#### To delete a check constraint
51
-
52
-
1. In **Object Explorer**, expand the table with the check constraint.
53
-
54
-
2. Expand **Constraints**.
55
-
56
-
3. Right-click the constraint and click **Delete**.
57
-
58
-
4. In the **Delete Object** dialog box, click **OK**.
59
-
60
-
## <aname="TsqlProcedure"></a> Using Transact-SQL
61
-
62
-
#### To delete a check constraint
63
-
64
-
1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)].
65
-
66
-
2. On the Standard bar, click **New Query**.
67
-
68
-
3. Copy and paste the following example into the query window and click **Execute**.
69
-
70
-
```
71
-
ALTER TABLE dbo.DocExc
72
-
DROP CONSTRAINT CHK_ColumnD_DocExc;
73
-
GO
74
-
```
75
-
76
-
For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md).
77
-
78
-
27
+
You can delete a check constraint in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Deleting check constraints removes the limitations on data values that are accepted in the column or columns included in the constraint expression.
28
+
29
+
**In This Topic**
30
+
31
+
-**Before you begin:**
32
+
33
+
[Security](#Security)
34
+
35
+
-**To delete a check constraint, using:**
36
+
37
+
[SQL Server Management Studio](#SSMSProcedure)
38
+
39
+
[Transact-SQL](#TsqlProcedure)
40
+
41
+
## <aname="BeforeYouBegin"></a> Before You Begin
42
+
43
+
### <aname="Security"></a> Security
44
+
45
+
#### <aname="Permissions"></a> Permissions
46
+
Requires ALTER permission on the table.
47
+
48
+
## <aname="SSMSProcedure"></a> Using SQL Server Management Studio
49
+
50
+
#### To delete a check constraint
51
+
52
+
1. In **Object Explorer**, expand the table with the check constraint.
53
+
54
+
2. Expand **Constraints**.
55
+
56
+
3. Right-click the constraint and click **Delete**.
57
+
58
+
4. In the **Delete Object** dialog box, click **OK**.
59
+
60
+
## <aname="TsqlProcedure"></a> Using Transact-SQL
61
+
62
+
#### To delete a check constraint
63
+
64
+
1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)].
65
+
66
+
2. On the Standard bar, click **New Query**.
67
+
68
+
3. Copy and paste the following example into the query window and click **Execute**.
69
+
70
+
```
71
+
ALTER TABLE dbo.DocExc
72
+
DROP CONSTRAINT CHK_ColumnD_DocExc;
73
+
GO
74
+
```
75
+
76
+
For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md).
0 commit comments