SQL Foreign Key

2006-03-12 Thread Andreas Krüger
This is a question onto defining foreign keys in a relational database. Foreign keys are featured by the InnoDB engine and therefore all three tables of the database use it: 1. `friends` main table 2. `relation` deploys a simple relation between rows of the main table, '1-2' means '1 is

SQL Foreign Key

2006-03-12 Thread Andreas Krüger
1) Sorry for not giving you the version: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. *mysql SELECT VERSION(); +---+ | VERSION() | +---+ | 5.0.17-nt | +---+* 1 row in set (0.00 sec) 2) Further, please note that the following output, of

Re: SQL Foreign Key

2006-03-12 Thread Andreas Krüger
(name) VALUES (School friends); Query OK, 1 row affected (0.03 sec) mysql ALTER TABLE friends ADD FOREIGN KEY (category) REFERENCES category(id); Query OK, 1 row affected (0.18 sec) Records: 1 Duplicates: 0 Warnings: 0 *mysql Sincerely, Andy Krueger Michael Stassen wrote: Andreas Krüger