Tuesday, June 16, 2009

sql funda

Primary key allows each row in a table to be uniquely identified and ensures that no duplicate rows exist and no null values are entered.

Unique key constraint is used to prevent the duplication of key values within the rows of a table and allow null values. (In oracle, one null is not equal to another null).

---
1)unique key can be null but primariy key cant be null.

2)primariy key can be refrenced to other table as FK.

3)we can have multiple unique key in a table but PK is one and only one.

4)PK in itself is unique key.

Friends i have got this from net.. you may have better answer....

No comments:

Post a Comment