Friday, May 16, 2014

Unique Index


A Unique index ensures that no one can enter duplicate values for that particular column(s).If you you insert 10 rows with the help of single queries which contain 5 duplicate values it reject all rows including non duplicate for this you have to use IGNORE_DUP_KEY caluse. it will insert non duplicate rows and reject duplicates rows. A unique index can not be created if column(s) already contain duplicate values. You can create unique index on composite column.Even null is considered as a value for unique index you can not insert multiple null values.

No comments:

Followers

Link