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
- Re: Using Perl DBI quote() method with NU... walt
- Re: Using Perl DBI quote() method with NU... Keith C. Ivey
- Re: Using Perl DBI quote() method with NU... Rodney Broom
- Re: Using Perl DBI quote() method with NU... Salam Baker Shanawa
- Re: Accessing last_insert_id problem. Jeff Snoxell
- Re: Accessing last_insert_id problem. Paul DuBois
- RE: Accessing last_insert_id problem. Will Merrell
- Badly placed ()'s and also access denied Gary Hostetler
- RE: Badly placed ()'s and also access den... Jennifer Goodie
- Re: Badly placed ()'s and also access... Gary Hostetler
- Re: CREATE TABLE issue? Jeff Snoxell
- Re: CREATE TABLE issue? Paul DuBois
- RE: CREATE TABLE issue? Adolfo Bello