What is a primary key, and how is it different from a unique key?
Answers were Sorted based on User's Feedback
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 |
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 |
• 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 are hotfixes and patches?
If a cursor is open, how can we find in a pl/sql block?
Types of indexes. What is the default key created when a primary key is created in a table ?
how to get @@error and @@rowcount at the same time? : Sql dba
What is fmtonly in sql?
How do you retrieve the last N records from a table?
what is difference between delete and truncate commands? : Sql dba
Which is the correct statement about truncate and delete?
what are the features and advantages of object-oriented programming? : Sql dba
In testing where do we use sql language and how it helps in testing?
why should required for Indexed by table in pl/sql
What does cursor do in sql?