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 are stored procedures in mysql?
How do I save a stored procedure?
Can primary key be changed?
What are sql queries used for?
What is user defined functions?
What are packages in pl sql and also explain its advantages?
Is pl sql still used?
What is sql keyword?
What is the syntax and use of the coalesce function?
what are the 'mysql' command line arguments? : Sql dba
what are the differences between char and varchar? : Sql dba
Which command is used to delete a package?
Why do we use joins?
What is the starting oracle error number? What is meant by forward declaration in functions?
How to make a copy values from one column to another in sql?