Kai, Sunday, August 18, 2002, 1:53:32 AM, you wrote: KV> Just created a table with a column named client_nr that is a foreign key KV> referencing to my Clients table:
KV> CREATE TABLE Contacts ( KV> contact_nr int not null auto_increment, KV> first_name char(30), KV> last_name char(30), KV> client_nr char (30), KV> email char(30), KV> tel_1 char(5), KV> tel_2 char(30), KV> mobile char(30), KV> fax char(30), KV> tel_home char(30), KV> foreign key (client_nr) references Clients (client_nr), KV> primary key (contact_nr) KV> ) KV> I know how to enter values using <insert into> but I don't know how to enter KV> the right key value from the Clients table. You just insert into Contacts.client_nr value that is present in the Clients.client_nr. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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