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 do you modify a column in sql?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
What is difference between stored procedure and trigger?
Advantages and disadvantages of stored procedure?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
How to get unique records from a table?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
What is Difference Between Unique and Primary Key Constraints?
What is the starting oracle error number?
how to concatenate two character strings? : Sql dba
Can variables be used in sql statements?
what are string data types? : Sql dba
How many triggers can be applied to a table?
How do you optimize a stored procedure query?
Is sql a case sensitive language?