Results 1 to 5 of 5

Thread: How to insert data in multiple (related) tables

  1. #1
    Join Date
    Sep 2006
    Posts
    3

    How to insert data in multiple (related) tables

    Hey,
    I know that inner joins can be used to retreive data from multiple related tables, but how can I insert data in multiple tables?
    Currenty I am using more SQL queries in order to do that (inserting data in one table, then reading the ID of the primary key in order to use it as a foreign key in another table, etc...), but I think there should be an easier way to do it.
    I am open to suggestions and the right way to do it.
    Thanks for your time!

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    May use trigger.

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Thanks for the reply, but what if the DBMS does not support triggers (e.g. Microsoft Access) ?
    Any ideas?

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Then you have to handle it in frontend app.

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Thanks, that was I "affraid" of

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •