What is differance unique key and primary key.
Answers were Sorted based on User's Feedback
Answer / rahul khanke
primary key : primary key dose not except null value
unique key : it accept null values.. if it set to not null
then it as good as primary key.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / hema
Unique :: it does not allow duplicate values but allows
null values.
Primary:: Primary does not allow duplicate values as wel as
it dosnt allow null values.
unique+not null==Primary key...
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / dhanashree
Unique Key can be NULL
But
Primary Key can not be NULL
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / madhu
unique key:
1.unique key will accept more than one null value.
2.whenever u created a unique key, then internally one non-clustered index will be created(one table can have more than one Non-clustered index).
3.one table can have more than one unique key.
Primary key:
1.One table should have one primary key only.
2.primary key will not accept null values.
3.whenever u created a primary key then internally one clustered index will be created(one table can have only one clustered index).
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gourvendra singh
Unique : One or more unique key in a table,
allow only one null in the field.
Primary :Only one primary key in a table and u cannot
insert null into it.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / nagurthilak
Through Unique key we cant establish the relation between to
two tables but from primary key it is possible
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / l..l.n.reddy
PRIMARY KEY:- only one primary key in a table.
UNIQUE KEY:- One or more unique key in a table.
| Is This Answer Correct ? | 1 Yes | 3 No |
Mention what are the benefits of pl/sql packages?
How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)
Write one update command to update seqno field of a table on the basis of row number.
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
what are string data types? : Sql dba
what are the different types of joins?
Write a query to genarate target column.Please answer me. Advance Thanks. Src Tgt Q10 Quarter to 2010 Q90 Quarter to 1990 Q80 Quarter to 1980 Q74 Quarter to 1974
how to find 5th row ?
What are the parts of a basic sql query?
How to get list of all tables from a database?
Where is pl sql used?
four procedures is are there should i write their in a package
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)