Hello,

I am creating tables within MySql  3.23.49. I want to add relation ships
between different tables. I tried to do this with foreign key statements.
For example:

CREATE TABLE domains (
  domain varchar(100) NOT NULL,
  registrarid int(10) NOT NULL,
  foreign key (registrarid) REFERENCES registrars(registrarid),
  PRIMARY KEY  (domain)
) TYPE=INNODB;

CREATE TABLE registrars (
  registrarid int(10) unsigned NOT NULL auto_increment,
  url varchar(200) default NULL,
  whois varchar(100) default NULL,
  tld varchar(100) default NULL,
  PRIMARY KEY  (registrarid)
) TYPE=INNODB

So the column registrarid in the domain table is a reference to the
registrars table(registrarid). When I put this in mysql it doesn't complain
about it. Then I use ODBC to link the database to Access. I use Access as my
front-end. There I cannot see the relationship. Also when I do a show create
table within mysql I cannot see the relationship. Is this the wrong way to
do this ? In other words, what is the right way to do this ?

Thanks Frank

---------------------------------------------------------------------
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

Reply via email to