26 Sep 2009

SQL

Posted by gavin

Insert

Inserting multiple rows in one statement

You can (on DB2 and MySQL) insert multiple rows using only 1 SQL statement.

INSERT INTO
	tableName (field1, field2, field3)
VALUES
	(record1value1, record1value2, record1value3),
	(record2value1, record2value2, record2value3)
	...
	(recordnvalue1, recordnvalue2, recordnvalue3);
VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
  • Print
  • Add to favorites
  • Facebook
  • StumbleUpon
  • del.icio.us
  • FriendFeed
  • Twitter
  • Digg

Tags: , , , ,

Leave a Reply

Message:

  • Browse

    or
  • Latest Content

  • Gallery

    2010_0110Wales0003 IMG_7000 2008_0427Stanage0035 2010_0102XmasAndNewYear0070
  • Tags

  • RSS<img src="http://www.gavinwillingham.com/wp-content/plugins/twitter-widget-pro/twitter_logo_s.png" height="21" width="92" alt="twitter logo" />

  • Comments