what is difference between primary key and Unique
Answers were Sorted based on User's Feedback
Answer / naresh
Primary key:it can not be null
Unique:it can have only one null value in a table.
| Is This Answer Correct ? | 13 Yes | 2 No |
Answer / thaqi
unique key: allows NULL values and doesn't allow duplicate
values.
primary key:doesn't allow both NULL and duplicate values
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / sivasankar k.c
Primary key: it is clustered index. it not allows null
values. Only one primary in each table.
Unique Key: it is non clustered index. Unique key allows
null values.its allows only one null value. More than one
unique key in table.
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / navneet sharma
Unique key allow null value and it is a non cluster index
Primary key does not allow null value and it is custer index
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / suresh kaudi
Primary Key: Not allow null values,when we make primary key
automatically create cluster index,primary key we make
other foreign key.
Unique key: allow one null value,we can't make it foreign
key to other table.here we cane make only non-cluster index
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sunil kumar mishra
Primary key is a particular coloum that is unique in every
tuple is called primary key and ofenly it does not support
null values since it is used to uniquely identitfy row in a
table(Relation) and automatically does go to replace into
clustered index and support distinct value and Each table
should have a primary key, and each table can have only one
primary key.(Primary keys must contain unique values)
Unique value-
Unique values is same, in some manner, primary key since
You can have many UNIQUE constraints per table but primaty
key kan have one in each table.it support nonClustered
index.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suresh kaudi
Primary key : Not Accept null values
Unique key : Accept Onley one null value
When you Make Primary key In a table cluster index create
Automatically mean default.
Unique Key create Automatically non-cluster index
| Is This Answer Correct ? | 0 Yes | 0 No |
How to download and install microsoft .net framework version 2.0?
Is truncate autocommit?
how will u create "n" possible tables in sql...
how can i lock the column in the table
What are dml triggers and types of dml triggers?
What is the difference between Drop and Truncate
What is difference between order by and group by?
What is set nocount on?
How to encrypt data between dialogs?
how to rest identity columns in sql server
can you any body tell me the difference between candidate key and primary key
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)