What is differance unique key and primary key.

Answers were Sorted based on User's Feedback



What is differance unique key and primary key...

Answer / rahul khanke

primary key : primary key dose not except null value
unique key : it accept null values.. if it set to not null
then it as good as primary key.

Is This Answer Correct ?    5 Yes 0 No

What is differance unique key and primary key...

Answer / hema

Unique :: it does not allow duplicate values but allows
null values.
Primary:: Primary does not allow duplicate values as wel as
it dosnt allow null values.

unique+not null==Primary key...

Is This Answer Correct ?    6 Yes 1 No

What is differance unique key and primary key...

Answer / dhanashree

Unique Key can be NULL
But
Primary Key can not be NULL

Is This Answer Correct ?    6 Yes 1 No

What is differance unique key and primary key...

Answer / madhu

unique key:
1.unique key will accept more than one null value.
2.whenever u created a unique key, then internally one non-clustered index will be created(one table can have more than one Non-clustered index).
3.one table can have more than one unique key.
Primary key:
1.One table should have one primary key only.
2.primary key will not accept null values.
3.whenever u created a primary key then internally one clustered index will be created(one table can have only one clustered index).

Is This Answer Correct ?    0 Yes 0 No

What is differance unique key and primary key...

Answer / gourvendra singh

Unique : One or more unique key in a table,
allow only one null in the field.

Primary :Only one primary key in a table and u cannot
insert null into it.

Is This Answer Correct ?    1 Yes 2 No

What is differance unique key and primary key...

Answer / nagurthilak

Through Unique key we cant establish the relation between to
two tables but from primary key it is possible

Is This Answer Correct ?    3 Yes 4 No

What is differance unique key and primary key...

Answer / l..l.n.reddy

PRIMARY KEY:- only one primary key in a table.

UNIQUE KEY:- One or more unique key in a table.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

I have a procedure in a procedure. The inner procedure contains out parameter. How I can call the inner procedure in the out procedure and send the inner procedure parameter value(out parameter value) into out procedure?

2 Answers  


Table Student has 3 columns,Student_id,Student_Name & Course_Id. Table Course has 2 columns, Course_Id & Course_Name.Write a query to listdown all the Courses and number of student in each course.

10 Answers   TCS,


What does partition by mean in sql?

0 Answers  


What is the maximum database size for sql express?

0 Answers  


Why we use cross join?

0 Answers  






What is the use of function "module procedure" in pl/sql?

0 Answers  


how to calculate the difference between two dates? : Sql dba

0 Answers  


What does where 1 1 mean in sql?

0 Answers  


What is difference between left and right outer join?

0 Answers  


query to retrive the employees whose sal is greater than avg sal

10 Answers   TCS,


What are %type and %rowtype for?

0 Answers  


Is there a way to automate sql execution from the command-line, batch job or shell script?

0 Answers  


Categories