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 are the different oracle database objects?

823


How to upsert (update or insert into a table)?

760


Design database draw er diagram for a certain scenario ?

4329


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

1859


How to view all columns in an existing table?

733


How to create an initialization parameter file?

755


How to view the data files in the current database?

816


What do you understand by database schema and what does it hold?

956


What privilege is needed for a user to create views in oracle?

811


What is a user role in oracle?

878


Can you assign multiple query result rows to a variable?

767


What are the different types of trigger and explain its various uses and functions?

754


What is a read only transaction in oracle?

820


How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

2056


What is the quickest way to fetch the data from a table?

818