PREMIUM
Join our WhatsApp Channel
Daily MCQs, Past Papers & Jobs for PPSC, FPSC, CSS
Daily MCQs • Past Papers • Jobs for PPSC, FPSC, CSS
Join Channel

What is a foreign key in a database?

A. A column containing the primary key of another table
B. Use to design data type
C. define null status
D. A key used for encryption
Correct Answer: A. A column containing the primary key of another table

Correct answer: A column containing the primary key of another table. A foreign key holds another table's primary key.

Background: They stop a record pointing to a row that does not exist.

  • Use to design data type: Data types are set when a column is defined, not by a foreign key.
  • define null status: Nulls are a separate column setting.
  • A key used for encryption: Encryption keys protect data, not link tables.

Did you know? It is named after the foreign table it points to.

Memory trick: Foreign means from another table.

0 comments

Leave a Reply

Join Our WhatsApp Channel ×