What is a primary key, and how is it different from a unique key?

Answers were Sorted based on User's Feedback



What is a primary key, and how is it different from a unique key?..

Answer / nashiinformaticssolutions

• Primary Key:
o Ensures each row in a table is unique.
o Cannot contain NULL values.
o A table can have only one primary key.
• Unique Key:
o Ensures all values in a column are unique.
o Can contain a single NULL value.
o A table can have multiple unique keys.

Is This Answer Correct ?    0 Yes 0 No

What is a primary key, and how is it different from a unique key?..

Answer / glibwaresoftsolutions

• Primary Key:
o Ensures each row in a table is unique.
o Cannot contain NULL values.
o A table can have only one primary key.
• Unique Key:
o Ensures all values in a column are unique.
o Can contain a single NULL value.
o A table can have multiple unique keys.

Is This Answer Correct ?    0 Yes 0 No

What is a primary key, and how is it different from a unique key?..

Answer / hr@tgksolutions.com

• Primary Key:
o Ensures each row in a table is unique.
o Cannot contain NULL values.
o A table can have only one primary key.
• Unique Key:
o Ensures all values in a column are unique.
o Can contain a single NULL value.
o A table can have multiple unique keys.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are hotfixes and patches?

0 Answers  


If a cursor is open, how can we find in a pl/sql block?

0 Answers  


Types of indexes. What is the default key created when a primary key is created in a table ?

5 Answers   TCS,


how to get @@error and @@rowcount at the same time? : Sql dba

0 Answers  


What is fmtonly in sql?

0 Answers  






How do you retrieve the last N records from a table?

10 Answers  


what is difference between delete and truncate commands? : Sql dba

0 Answers  


Which is the correct statement about truncate and delete?

0 Answers  


what are the features and advantages of object-oriented programming? : Sql dba

0 Answers  


In testing where do we use sql language and how it helps in testing?

2 Answers  


why should required for Indexed by table in pl/sql

3 Answers  


What does cursor do in sql?

0 Answers  


Categories