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
What are the different oracle database objects?
How to upsert (update or insert into a table)?
Design database draw er diagram for a certain scenario ?
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.
How to view all columns in an existing table?
How to create an initialization parameter file?
How to view the data files in the current database?
What do you understand by database schema and what does it hold?
What privilege is needed for a user to create views in oracle?
What is a user role in oracle?
Can you assign multiple query result rows to a variable?
What are the different types of trigger and explain its various uses and functions?
What is a read only transaction in oracle?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
What is the quickest way to fetch the data from a table?