> 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
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
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
3 matches
Mail list logo