At 17:13 +0000 12/20/02, Jeff Snoxell wrote:
>Hi again :)
>
>I found the following mysql stuff in the MySQL manual in a section
>explaining how to do relationships.
>
>CREATE TABLE persons (
> id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
> name CHAR(60) NOT NULL,
> PRIMARY KEY (id)
>);
>
>CREATE TABLE shirts (
> id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
> style ENUM('t-shirt', 'polo', 'dress') NOT NULL,
> color ENUM('red', 'blue', 'orange', 'white', 'black') NOT NULL,
> owner SMALLINT UNSIGNED NOT NULL REFERENCES persons,
> PRIMARY KEY (id)
>);
>
>What's the point of the "REFERENCES persons" bit at the end of the
>definition of table "Shirts"? It doesn't seem to do anything.
Right, you can leave it out.