I was wondering if any SQL people out there know if i can INSERT INTO 2 tables at the same time? I havent found a yes to the question so i thought i would throw it out there and see what everyone has to say.
word
I would say no. (Insert syntax ishere.) However, if you want to insert twice with one database call, simply separate your SQL statements with semicolons, i.e.
Insert [statement 1]; Insert [statement 2]; Insert [statement 3];
|||Asps2goatmentioned, they'd have to be 2 separate transactions. You can put the 2 INSERTs in a stored proc and call the proc from your application, so you are not making multiple calls from your front end.|||Thanks for the help guys, it solved the situation i was in. Much appreciation and hopefully.....oneday......i myself will be a sql guru haha
No comments:
Post a Comment