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

Add A Constraint To An Existing Table

P: 40
create table student(roll int,name varchar(10))
insert into student values(1,'YOGESH')

NOT NULL(name)
Incorrect syntax near the keyword 'NOT'.

I m not getting how to add constraint.
May 3 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,878
I think this you're going to define this as CHECK CONSTRAINT. Here's the full ALTER TABLE syntax.

-- CK
May 4 '08 #2

Post your reply

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