primary key vs unique index

I have 2 tables and i want to retrieve data from them and combine data to do some processing
I haven't made any column as PRIMARY yet ..

what is better to way do, shud i make col. as PRIMARY KEY in the tables separately or can i also make UNIQUE INDEX .. is unique index similar to making primary key ..




max_dubAsked:
Who is Participating?
 
dqmqCommented:
You always want a primary key; you get a unique index by default.  Primary key is a logical constraint that is implemented with a unique index.  The advantage of the primary key is that it does not allow nulls and it is referenceable by a foreign key constraint.  



 
0
 
max_dubAuthor Commented:
if i am not clear on question, please let me knw.. i am just getting to knw db's
0
 
dqmqCommented:
PS. There is no additional overhead for the PK, just benefit.  
0
 
max_dubAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.