AFAIK, MySQL doesn't have any sort of referential integrity checks with fields. conceptually, you can do it, and write your program to force it, but the database itself doesn't have it.
John Meyer P.S. shouldn't it be table1.fieldA -----Original Message----- From: R. Hannes Niedner [mailto:hannes.niedner@;gmx.net] Sent: Tuesday, November 12, 2002 1:55 PM To: MySQL Mailinglist Subject: Re: How to link tables in MySQL On 11/12/02 12:41 PM, "tmb" <[EMAIL PROTECTED]> wrote: > 2 - In MS Access you have to graphically connect the > table id fields to tell Access how the tables relate. > > How do you do this In MySQL... from the command line > I'm sure... just a code snippit or reference to one > would be nice... You join the tables using : WHERE fieldA.table1 = fieldB.table2 So check out the join syntax in the manual. /h --------------------------------------------------------------------- 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