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
tell us something about heap tables. : Sql dba
What are variables in pl sql?
What is the difference between Union and Union all. Which is faster.
What are local and global Indexes and where they are useful.
explain primary keys and auto increment fields in mysql : sql dba
Explain the purpose of %type and %rowtype data types?
Is sqlite free?
Describe different types of general function used in sql?
What is pls_integer in pl sql?
What is recursive stored procedure?
what is the command used to fetch first 5 characters of the string? : Sql dba
Which join is like inner join?
How to look at the current sql*plus system settings?
how to decrement dates by 1 in mysql? : Sql dba
What is thread join () in threading?