Difference between revisions of "Foreign Keys"

From Hostek.com Wiki
Jump to: navigation, search
(Are Foreign Keys Supported?)
 
Line 1: Line 1:
 
==Are Foreign Keys Supported?==
 
==Are Foreign Keys Supported?==
  
Information regarding database systems that support foreign keys, and requirements(if any) for their use.
+
Information regarding whether database system support foreign keys, and requirements(if any) for their use.
  
 
===MySQL===
 
===MySQL===

Latest revision as of 16:44, 21 November 2012

Are Foreign Keys Supported?

Information regarding whether database system support foreign keys, and requirements(if any) for their use.

MySQL

MySQL supports foreign key relationships. However, they can only be created for InnoDB tables (not MyISAM tables, which are the default type).


NOTE:

If you are creating your tables with SQL queries, you would add TYPE=INNODB at the end of the table declaration to create the table as an InnoDB type.

If you are using phpMyAdmin, you would select InnoDB as the type when you create your tables.


MSSQL

Microsoft SQL Server supports foreign key relationships.


Microsoft Access

Microsoft Access supports foreign key relationships.