Delete Check Constraints
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
You can delete a check constraint in SQL Server by using SQL Server Management Studio or Transact-SQL. 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:
To delete a check constraint, using:
Before You Begin
Security
Permissions
Requires ALTER permission on the table.
Using SQL Server Management Studio
To delete a check constraint
In Object Explorer, expand the table with the check constraint.
Expand Constraints.
Right-click the constraint and click Delete.
In the Delete Object dialog box, click OK.
Using Transact-SQL
To delete a check constraint
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
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).
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho