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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between syntax and runtime errors.

834


How do you write an inner join query?

684


what are the t string functions available in tsql? : Transact sql

724


Is inner join same as self join?

776


Do we need to rebuild index after truncate?

690






What is thread join () in threading?

723


How do I view stored procedures?

735


Mention what is the use of function "module procedure" in pl/sql?

778


how to create a test table in your mysql server? : Sql dba

677


What is memory optimized?

742


Explain sql data types?

823


What are the three pl sql block types?

712


How do I truncate a sql log file?

731


what does it mean to have quoted_identifier on? : Sql dba

882


What is difference between hql and sql?

691