Is primary key = unique key,not null?
If yes,please explain
IF No,please explain

Answer Posted / arti kesharwani

No they are not equal because
we can have more than one column with not null+Unique constraints but we can have only one primary key in the table.
e.g
we can not create a table like this
create table test(id number primary key , name varchar2(10) primary key)
but we can create
create table test(id number unique not null , name varchar2(10) unique not null)

Is This Answer Correct ?    19 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is snapshot is too old? Give and example for better understand.

1101


How many types of database triggers exist?

577


How to rename a column in an existing table?

619


What are the different types of record groups in oracle? Explain each of them

606


Explain the blob datatype?

620






How to define a data field as not null?

636


Explain oracle insert into command?

632


Why packages are used in oracle?

545


Can you assign multiple query result rows to a variable?

552


What is program global area (pga) in oracle?

609


How will you differentiate between varchar & varchar2?

594


What are the restrictions on external table columns?

552


What are the arithmetic operations?

590


What are the logical operations?

677


What is an index associated with a constraint?

554