Re: How can I insert multiple rows in a single SQL statement

From: David Cressey <david_at_dcressey.com>
Date: Sat, 27 Jul 2002 12:06:33 GMT
Message-ID: <d1w09.15$lq1.1129_at_petpeeve.ziplink.net>


Pardon me for jumping into this late. Also pardon me for not knowing what "sprintf" is.

You say you want to insert thousands of rows in a single action, but the insert only lets you insert one row.

True, but most RDBMS products will let you put thousands of inserts into a single transaction. So why can't you
start a transaction, perform thousands of inserts, and then commit the transaction?

Again, a few RDMS products will let you defer constraint processing until transaction commit time. Sometimes, this can significantly reduce the overhead of constraint checking.

A few RDBMS products allow you to set up a transaction that locks everybody else out of the database, and performs the entire transaction with no ROLLBACK capabilities. There's a downside to this, but it's sometimes useful nonetheless.

Is informix your RDBMS? Does it have any these features? Can you use them from your programming environment?

--
Regards,
    David Cressey
    www.dcressey.com
"Ryan Hennessy" <ryan.hennessy_at_alcatel.com> wrote in message
news:3D3C1C44.3570B597_at_alcatel.com...

> Good morning,
>
> I'm having trouble coming up with a way to insert multiple rows worth of
> arbitrary values into a table in a single SQL query.
Received on Sat Jul 27 2002 - 14:06:33 CEST

Original text of this message