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

How do temporal tables work?

514


what is a foreign key ? : Sql dba

599


What is substitution variable in pl sql?

494


what are the types of subquery? : Sql dba

577


What is PL/SQL Records?

616






ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

1999


What does select * from mean in sql?

1977


Should I use mbr or gpt?

531


What is a join query?

541


What is the use of index in sql?

543


What is sql catalog?

555


Does truncate release storage space?

548


Can a table have no primary key?

545


Does sap use sql?

511


What is a loop in sql?

558