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 / gazulas
if it is Primary key then we can make use foreign key in other table and can use the referential integrity concept
for unique keys we dont have that.
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
what is the difference between undefined value and null value? : Sql dba
How do sql triggers work?
How does one use sql*loader to load images, sound clips and documents? : aql loader
What are the operators in sql?
Can we join two tables without common column?
How do you create an update query?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
how to drop an existing view in mysql? : Sql dba
What is difference between primary and secondary key?
How to select random rows from a table?
What is a sql instance vs database?
Can we insert in view in sql?
What is normalization? How many normalization forms are there?
What is the difference between truncate and drop statements?
What is normalization in sql?