![]() |
| ||
| Nested insert queries in a single query hi , I have four different tables, all are linked together using foreign key relationships. Now i need to insert data in to the tables.How can i use nested insert queries to insert data by a single query? |
| ||
| Re: Nested insert queries in a single query Quote:
I suggest using transactions (you need the InnoDB storage engine for this). start transaction If one of your statements causes an error none will be committed so you won't get corrupted data / missing keys etc. |
| All times are GMT -4. The time now is 10:55 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC