Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Tracy J Powell: "Thank you VERY much for the quick and helpful response. I will definitely upgrade as soon as possible. Your products are great and I use them daily".
Paolo Benjamin T. Briones: "I just downloaded the trial and its great! IMHO, its a lot better than the Enterprise Manager from SQL Server".

More

Add your opinion

MS SQL Maestro online Help

Prev Return to chapter overview Next

Checks

A check constraint is the most generic constraint type. It allows you to specify that the value in a certain column must satisfy a Boolean (truth-value) expression.

 

 

The Check Properties editor allows you to add a new check constraint or edit an existing one. This dialog can be invoked from Table Editor, or via the popup menu of the corresponding nodes of the explorer tree.

 

 

Checks are created within Check Properties. In order to run the wizard you should either

 

open the table in Table Editor and the Checks tab there;
press the Insert key or select the Add New Check... item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

or

select the table in the explorer tree and use the Create New Check... popup menu item

or

select the table Checks node or any check within the table in the explorer tree and use the Add New Check... popup menu item.

 

 

 

Checks are edited within the Check Properties dialog window. In order to open the dialog you should either

 

open the table in Table Editor the Checks tab there;
press the Enter key or select the Edit Check item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

or

select the check to edit in the explorer tree and use the Edit Check popup menu item.

 

You can change the name of the check using the Rename Check dialog. To open the dialog you should either

 

select the check to rename in the explorer tree;
select the Rename Check item from the popup menu

or

open the table in Table Editor and the Checks tab there;
select the check to rename;
select the Rename Check item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

 

 

 

To drop the check:

 

select the check to drop in the explorer tree;
select the Drop Check item from the popup menu

or

open the table in Table Editor and the Checks tab there;
press the Delete key or select the Drop Check item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

 

and confirm dropping in the dialog window.

 

 


 

Name

The name of the check constraint.

 

Comment

This field contains an optional text describing the check.

 

 

Condition

Specify an expression producing a Boolean result which new or updated rows must satisfy for an insert or update operation to succeed. Expressions evaluating to True or Unknown succeed. In case any row of an insert or update operation produce a FALSE result an error exception is raised and the insert or update does not alter the database.

 

 

Check Existing Data

Specifies whether the data in the table is or is not validated against a newly added or re-enabled CHECK constraint.

 

Not For Replication

If checked, the constraint is not enforced when replication agents perform insert, update, or delete operations.

 

Disabled

If the option is selected, the check is disabled.

 

 



Prev Return to chapter overview Next