what is the different between unique+not null & primary key,
Answers were Sorted based on User's Feedback
Answer / sreekumar
In a relation, we can create only one primary key where as we can create multiple unique+not null constrains.
Primary key uses clustered index where are unique +Not null uses non clustered index.
Sreekumar
| Is This Answer Correct ? | 18 Yes | 1 No |
Answer / suresh babu
Unique:
Unique is a constraint,which doesn't allow the duplicate
values and allow only one null value.We can create more
number of unique constraint in single table.
Not Null:
Not Null constraint,which doesn't allow the Null values and
allow the duplicate values.
Primary Key:
We can create one primary key for a table,Which doesn't
allow the duplicate and null values,and used for make a
foreign key relation.we can't do this process using above
two constraints.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / mohan babu
A unique key is nothing but it does not allow any
duplicateds but allows nullvalues
A primary key is nothing but it does not allow duplicates
as well as Null values i.e Not Nulls
| Is This Answer Correct ? | 5 Yes | 5 No |
Answer / giri
unique:it does not allow duplicate values but it allow null values.
not null:It does not allow null values but allow duplicate values.
primary:It does not allow both duplicate and null values.
| Is This Answer Correct ? | 0 Yes | 0 No |
How can analyze query after generating explain plan ?
What is the difference between the Primary and Foreign key?
what is sub-query? : Transact sql
7. Where would you look for errors from the database design?
Explain the methods used to protect source code of pl/sql.
Is full outer join same as cross join?
In table three columns with 1 milion records(here there is no sequence values) i want add one more column with sequence values from the first how it is posible?
What is package in pl sql?
There is a table, In one column it has implemented a index, but the index is disturbed by the regular dml statements.. but still we need to keep the index. how it is possible?
What is spool?
which will default fire first statement level trigger or row level trigger
2 Answers Cap Gemini, Data Vision,
How to run sql statements with oracle sql developer?
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)