IT Questions and Answers :)

Wednesday, November 22, 2017

Which of the following is always true in a MySQL database?

Which of the following is always true in a MySQL database?

  • Foreign keys cannot contain duplicate data
  • Foreign keys must always refer to an indexed column
  • Foreign keys cannot contain null
  • Foreign keys must only ever be numeric 
Which of the following is always true in a MySQL database?

EXPLANATION

In MySQL, a foreign key must always refer to an indexed column. A foreign key may contain duplicate data or nulls, and can even be textual in nature.The requirement on indexing is for performance reasons, and if your table is an InnoDB table, an index may be created automatically for any foreign key you create, if one does not already exist.

SOURCE

https://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html
Share:

0 comments:

Post a Comment

Popular Posts