The Checks collection contains Check objects exposing Microsoft® SQL Server™ integrity constraints defined on the columns of a table.
With the Checks collection, you can:
SQL Server integrity constraints can be defined as part of a CREATE TABLE or ALTER TABLE statement.
When creating a SQL Server table using the Table object, an empty Checks collection is created as part of the Table object creation. Adding Check objects to the Checks collection adds constraint definition text to the CREATE TABLE statement generated when the Table object is added to the Tables collection of a Database object.
If a Table object references an existing SQL Server table, changes to the Checks collection generate ALTER TABLE statements.
For more information about creating integrity constraints, see Check Object.
To remove a CHECK constraint
oTables("Order Details").Checks.Remove("CK_Order Details_Discount")
Add Method | Remove Method (Collections) |
Refresh Method |
ALTER TABLE | CREATE TABLE |