IN A TABLE HAVE ONE COLUMN PRIMARY KEY..IT WILL NOT ALLOWS
NULL VALUES AND DUPLICATE VALUES..INSTEAD OF PRIMARY KEY
WHY CANT WE USE UNIQUE AND NOT NULL.THESE TWO ALSO DOESNT
ACCEPT NULL VALUES IN NOT NULL AND UNIQUE DOESNT ACCEPT
DUPLICATE VALUES?
SO WHAT IS THE DIFEERENCE BETWEEN(UNIQUE,NOT NULL) AND
PRIMARY KEY??????
Answer Posted / aritra biswas
With the creation of primary key the oracle server
automatically creates and maintains a index on the primary
key column(s). Because of that index, the searching
processes on that table will be very fast where as
declaring a column as a (unique+not null) will not create
any index on that colum(s).It has to be created manually by
the DBA/users if we wish to enhance the searching process.
| Is This Answer Correct ? | 8 Yes | 7 No |
Post New Answer View All Answers
What is a left join?
What is difference between hql and native sql?
how can we destroy the cookie? : Sql dba
What are different types of sql commands?
What is sql and db2?
Which is faster union or join?
Explain the difference between sql and mysql.
What is insert command in sql?
Is it possible for a table to have more than one foreign key?
What is substitution variable?
Explain the components of sql?
What is the least restrictive isolation level? : Transact sql
Why is %isopen always false for an implicit cursor?
How do you delete data from a table?
What are the various levels of constraints?