Wednesday, March 28, 2012

How to insert data into two tables simulatneously, using Stored Procedure?

Hi all,
I have heard that we must insert into two tables simultaneously when there is a ONE-TO-ONE relationship.

Can anyone tell me how insert into two tables at the same time, using SP?

Thanks

Tomy

tomyseb:


I have heard that we must insert into two tables simultaneously when there is a ONE-TO-ONE relationship.

Not true.

The fact is that you can't insert into 2 tables simultaneously. Commands are executed in a procedural fashion.

Also, it extremely rare to need a one-to-one relationship. A typical example of when it is useful is if you would otherwise be in danger of going over the maximum number of fields limit in Access, and need to break the table up.

sql

No comments:

Post a Comment