Thursday, September 30, 2010

How to add constraint on table?

After creating student_target table, if we want
to make studentno as primary key then add constraint
on that.

ALTER TABLE STUDENT_TARGET ADD CONSTRAINT STUDENT_PK PRIMARY KEY (STUDENTNO)

here STUDENT_PK is the constraint name

1 comment:

  1. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.


    Dataware Housing Training in Chennai | Hadoop Training in Chennai

    ReplyDelete