Nocheck Constraint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raghulvarma
    New Member
    • Oct 2007
    • 90

    Nocheck Constraint

    Can any body help me why do we go for nocheck constraint what is the main use of it?
    my next question is what means by this statement below mentioned


    create table sample1 (empid varchar(7) not null default 'new',empname varchar(20) not null default 'new' constraint pk_empid primary key(empid))

    actually here a primary key constraint is created here but what for we use default 'new' , this query was done by my DBA I just need to know what is the use of that (default 'new')
    If my question is so simple plz forgive me!I just want to learn them
    Thanks in advance
    Raghul
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    This is a good read about CONSTRAINT.

    About the 'new', I don't think it refers to the constraint. It refers to the DEFAULT. It means the default value of the field is the constant string 'new'.

    -- CK

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      default 'new' menas the default value for the field is 'new'

      if the user skips entry to the field the value 'new' is inserted to the field by default.

      Comment

      Working...