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


Please Help Members By Posting Answers For Below Questions

Why is partition used in sql?

668


Enlist some predefined exceptions?

693


What is the difference between delete and truncate commands?

586


Are dml statements autocommit?

643


What is the default isolation level in sql server? : Transact sql

662






Can there be more than one function with a similar name in a pl/sql block?

634


What is before and after trigger?

610


Can we debug stored procedure?

620


What is scalar data type in pl sql?

670


what is union, minus and interact commands? : Sql dba

765


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

605


What is recursive stored procedure?

701


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

671


Mention what is the use of function "module procedure" in pl/sql?

689


How to display Row Number with Records in Oracle SQL Plus?

679