By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,379 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,379 IT Pros & Developers. It's quick & easy.

Nocheck Constraint

P: 90
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
May 2 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,878
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
May 2 '08 #2

Expert 5K+
P: 8,127
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.
May 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.