Re: [sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread Wilson, Ronald
> Put parentheses around the strftime() function call: > > CREATE TABLE info(..., stamp DEFAULT (strftime('%f','now'))) > > The extra parentheses are needed to avoid a parsing ambiguity in the > SQL language. > > D. Richard Hipp > d...@hwaci.com Perfect! Ron Wilson, Engineering Project

Re: [sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread D. Richard Hipp
On Aug 25, 2009, at 11:04 AM, Wilson, Ronald wrote: > Is there a way to set a default timestamp with fractional seconds? > This gives a syntax error (obviously) but expresses my intent: > > CREATE TABLE info(k, v, stamp DATETIME default strftime('%Y-%m-%d > %H:%M:%f', 'now')); > Put

[sqlite] CURRENT_TIMESTAMP with fractional seconds?

2009-08-25 Thread Wilson, Ronald
Is there a way to set a default timestamp with fractional seconds? This works but doesn't give fractional seconds: CREATE TABLE info(k, v, stamp DATETIME default CURRENT_TIMESTAMP); This gives a syntax error (obviously) but expresses my intent: CREATE TABLE info(k, v, stamp DATETIME