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 / prativa mishra
We can create more unique key in a table but we can not create more then one primary key in a table.At the time of primary key creation thr is a clusterd index created automatically and it sorts data physically. It helps in searching process which not possible in unique+notnull column
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What are predefined functions in sql?
What is trigger types of trigger?
What are the parts of a sql statement?
How to download oracle sql developer?
Which sql statement is used to return only different values?
When can we use the where clause and the having clause?
How many primary keys can a table have?
What is an exception in PL/SQL? What are the two types of exceptions?
How is indexing done in search engines?
Can you join a table to itself?
What is sql architecture?
what is myisam? : Sql dba
What is primary and foreign key?
what is a database transaction? : Sql dba
What are the different set operators available in sql?