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 / upendra
Primary key creates Clustered Indexes. Clustered indexes physically sort the data.
Unique can have only Non-clustered indexes, where data are not physically sorted.
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
What is the use of stored procedures?
What are analytic functions in sql?
What is record type in pl sql?
How can I tell if sql is running?
How subquery works in sql?
Define tables and fields in a database
Explain aggregate functions are available there in sql?
What is numeric function sql?
Is natural join same as inner join?
What is a common use of group by in sql?
what is top in tsql? : Transact sql
What is meant by user defined function?
What is keys and its types?
what is data control language? : Sql dba
What is constant in pl sql?