Insert in DB2 many-to-many table
From: chunks <member39419_at_dbforums.com>
Date: Sat, 13 Sep 2003 08:05:24 -0400
Message-ID: <3366371.1063454724_at_dbforums.com>
Date: Sat, 13 Sep 2003 08:05:24 -0400
Message-ID: <3366371.1063454724_at_dbforums.com>
Hi all !!
I have this question:
I have an t_account table with acc_id (identity type) as PK
I have another table t_customer with cust_id (identity type) as PK.
t_account and t_customer share a many-to-many relationship. So I have a third table t_acc_cust to reflect the many to many relationship.
t_acc_cust(acc_id,cust_id).
In my database iserts, I have an account and a number of customers. How can I write the SQL statements so the the t_account, t_customer tables get inserted with new values and also the t_acc_cust table gets populated with acc_id and cust_id.
Regards and thanks
-- Posted via http://dbforums.comReceived on Sat Sep 13 2003 - 14:05:24 CEST