Ankur Jain
What is the difference between a check constraint and a rule?
By Ankur Jain in Databases & DBA on Aug 18 2014
  • suneel gupta
    Dec, 2016 27

    The major difference between rule and Check is re usability. Check constraint is associated with columns in a Table. So these can't be re-used. Rules are defined with in a database and can be applied to any number of columns.

    • 1
  • Kml Surani
    May, 2015 13

    There are a lot of difference but One the most notable difference is that we can bind rules to a datatypes whereas constraints are bound only to columns. this feature enable us to create our own data-type with the help of Rules and get the input according to that.

    • 0
  • Kml Surani
    May, 2015 13

    Rules are a backward-compatibility feature that performs some of the same functions as CHECK constraints. CHECK constraints are the preferred, standard way to restrict the values in a column. CHECK constraints are also more concise than rules; there can only be one rule applied to a column, but multiple CHECK constraints can be applied. CHECK constraints are specified as part of the CREATE TABLE statement, while rules are created as separate objects and then bound to the column.

    • 0
  • Abrar Ahmad Ansari
    Mar, 2015 10

    There are a lot of difference but One the most notable difference is that we can bind rules to a datatypes whereas constraints are bound only to columns. this feature enable us to create our own data-type with the help of Rules and get the input according to that

    • 0
  • Munesh Sharma
    Feb, 2015 14

    http://www.codeproject.com/Questions/609687/DifferenceplusbetweenplusConstraintsplusandplusRul

    • 0
  • Ankur Jain
    Aug, 2014 18

    Check constraints and rules limit the range of values that a user can enter into a column. Whereas check constraints apply only to the table for which you enter them, you can apply rules to multiple tables.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS