Missing TYPE=INNODB in create table statement.
MySQL parses references for type MyISAM but doesn't use them.
Adolfo
-Original Message-
From: Jeff Snoxell [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 1:14 PM
To: [EMAIL PROTECTED]
Subject: CREATE TABLE issue?
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.
Jeff
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php