If we declare constraints Unique and Not null on a single
column then it will act as a Primary key, so what is the use
of primary key??

Answer Posted / neha sinha

1) Primary key creates clustered index and unique key
creates non-clustered index. Performance wise clustered
index is fast so we need Primary key.
2)if we need more then one primary key in table than we can
use unique key+NOT NULL becous it behave as Primary key but
we cant define more than one column as primary key. :)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does view store data in sql?

695


Which join is like inner join?

757


what is the use of set statement in tsql? : Transact sql

732


What is mdb stand for?

728


What does 0 mean in sql?

690






How do you write a complex sql query?

771


What is mutating table error?

875


Which table is left in join?

683


What are tables in sql?

735


What is a function in oracle pl sql?

713


What is denormalization in a database?

780


how to enter binary numbers in sql statements? : Sql dba

697


What is cursor status?

927


Name three sql operations that perform a sort.

784


How to write a query to show the details of a student from students table whose

752