what is the different between unique+not null & primary key,

Answers were Sorted based on User's Feedback



what is the different between unique+not null & primary key,..

Answer / sreekumar

In a relation, we can create only one primary key where as we can create multiple unique+not null constrains.

Primary key uses clustered index where are unique +Not null uses non clustered index.

Sreekumar

Is This Answer Correct ?    18 Yes 1 No

what is the different between unique+not null & primary key,..

Answer / suresh babu

Unique:

Unique is a constraint,which doesn't allow the duplicate
values and allow only one null value.We can create more
number of unique constraint in single table.

Not Null:

Not Null constraint,which doesn't allow the Null values and
allow the duplicate values.

Primary Key:

We can create one primary key for a table,Which doesn't
allow the duplicate and null values,and used for make a
foreign key relation.we can't do this process using above
two constraints.

Is This Answer Correct ?    4 Yes 0 No

what is the different between unique+not null & primary key,..

Answer / mohan babu

A unique key is nothing but it does not allow any
duplicateds but allows nullvalues

A primary key is nothing but it does not allow duplicates
as well as Null values i.e Not Nulls

Is This Answer Correct ?    5 Yes 5 No

what is the different between unique+not null & primary key,..

Answer / giri

unique:it does not allow duplicate values but it allow null values.
not null:It does not allow null values but allow duplicate values.
primary:It does not allow both duplicate and null values.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

4. Select sum(A.salary) +sum(B.salary) as TOT_SAL from ( select LEVEL emp_id,level*100 salary,case when mod (level,2)=0then 2 else null end dept_id from dual connect by level<6 )A right outer join (select level emp_id ,level*200 salary ,case when mod (level,3)=0 then 2 else null end dept_id from dual connect by level<6)B On A.dept_id=B.dept_id And A.emp_id=B.emp-id;

1 Answers   Fintellix,


Which is the best place to learn hadoop?

1 Answers  


Which nosql database is best?

0 Answers  


Can you have more than one trigger on a table?

0 Answers  


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

0 Answers  






What is %rowtype in pl sql?

0 Answers  


What is rollback?

0 Answers  


What are the uses of sysdate and user keywords?

0 Answers  


What is the trigger in sql?

0 Answers  


What is write ahead logging in sql server?

0 Answers  


what is oltp (online transaction processing)? : Sql dba

0 Answers  


How do I turn a list into a table?

0 Answers  


Categories