In focus

    About constraints

    Constraints are the rules which are used on data columns on table and limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database. Constraints could be column level or table level and are applied only to one column whereas table level constraints are applied to the whole table. A Constraints is a property which is used for assign to column in table. By assigning Constraints property on column we can prevent the users to enter inconsistent of data in columns. We can assign these Constraints properties during the time of creation of table By Using CREATE TABLE statement. Constraints is the way in which we can define the Database Engine which automatically enforces the integrity of a database. Constraints define rules regarding the values allowed in columns and are the standard mechanism for enforcing integrity. By Using Constraints is preferred to using DML Triggers, rules, and defaults. The query optimizer also uses Constraints definitions to build high performance query execution plans.