Primary key table in database - Database

Q.  How many primary key can a table in database have?
- Published on 28 Aug 15

a. Only one
b. At least one
c. More than one
d. Any number of

ANSWER: Only one
 

    Discussion

  • Nirja Shah   -Posted on 30 Oct 15
    Primary key
    - It is a field in a table which uniquely identifies each row/record in a database table.

    - They must contain unique values.

    - This column which is a primary key cannot have NULL values.

    - A table can have only one primary key, which may consist of single or multiple fields.

    - When multiple fields are used as a primary key, they are called a composite key.

    - If a table has a primary key defined on any field(s), then you can not have two records having the same value of that field(s).

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)