Difference between revisions of "Foreign Keys"
From Hostek.com Wiki
(Created page with "==Are Foreign Keys Supported?== Yes. However they can only be created for InnoDB tables (not MyISAM tables, which are the default type). If you are creating your tables with ...") |
|||
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. | |
− | + | ||
− | If you are using phpMyAdmin, you would | + | ===MySQL=== |
− | InnoDB as the type when you create your tables. | + | '''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. | ||
[[category:Databases-MySQL]] | [[category:Databases-MySQL]] | ||
+ | [[category:Databases-MSSQL]] | ||
+ | [[category:Databases-Access]] |
Revision as of 16:42, 21 November 2012
Are Foreign Keys Supported?
Information regarding database systems that 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.