Hi Nick, On Tue, 28 Aug 2007 17:39:16 +0100, you wrote:
> When enclosed in a single transaction, would inserting > many rows into a table using the special default keyword > 'CURRENT_TIMESTAMP' result in all of the rows > guaranteeing the same timestamp value? Did you try? I did. Surprisingly, it doesn't give the same value in every row. Perhaps it should. Joe Celko thinks it should. (SQL for Smarties, third edition, 2005 Elsevier; paragraph 4.2.3 Handling Timestamps). > If not, is there a recommended way to assign a unique > value to a collection of inserts in a single transaction > generated from a trigger? I'm sorry, I have no usable ideas at the moment. Your problem suggests the timestamp will be used as a foreign key. In such cases I usually use a natural key (i.e. propagate the primary key of the referred table) or generate a synthetic key for both in the application. > Thanks in advance > Nick Regards, -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------