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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need databases?

758


what is innodb? : Sql dba

797


How can I delete duplicate rows?

763


Does sql view stored data?

739


What is sql architecture?

782


How do I partition in sql?

730


What is Materialized View? In What Scenario we Use Materialized View?

8996


Can pl sql procedure have a return statement?

752


What is pl sql package?

820


How does cross join work?

687


Explain how exception handling is done in advance pl/sql?

755


What is the least restrictive isolation level? : Transact sql

796


What does 0 mean in sql?

725


What is the difference between function, procedure and package in pl/sql?

804


What does select count (*) mean in sql?

768