How to mysql insert into multiple tables at a time

Posted: July 20, 2011 in MySql
Tags:

Sometimes we confuse about how to mysql insert into multiple tables at a time ? This so easy just like below the code

INSERT INTO table1(c1, c2, c3), table2(c4, c5, c6) VALUES ('v1', 'v2',
'v3',v4, 'v5', 'v6');

That’s all.

Advertisements
Comments
  1. gogula says:

    Very interesting, please clarify how to insert data into relational database(ie Innodb).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s