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
how to get @@error and @@rowcount at the same time? : Sql dba
What is varchar data type in sql?
Can sql function call stored procedure?
What do you mean by stored procedures?
Does sql between include endpoints?
What are the different ways to optimize a sql query?
How do you remove duplicate records from a table?
What are properties of the transaction?
How do you select unique values in sql?
What is the syntax and use of the coalesce function?
what does it mean to have quoted_identifier on? : Sql dba
How to connect a sql*plus session to an oracle server?
how to use 'mysql' to run sql statements? : Sql dba
What is time based sql injection?
how can we submit a form without a submit button? : Sql dba