Wednesday, August 18, 2010

How to insert data into two table from a single command?

I want to insert data into two table from a single command. Is this possible or not. If yes how and command also. By any means by creating views or procedures or by any damn method. I just want to insert data.How to insert data into two table from a single command?
The best thing is to pass the data to be updated to a stored procedure, for the purposes of the application it is 'one command' only in the procedure carry out two insert statements, one for each table.





I am of the school you always use a procedure to select or update the database.





Actaul code depends on your code, database and database connection method.

No comments:

Post a Comment