Igor Tandetnik wrote:
> "John" <[EMAIL PROTECTED]> wrote
> in message news:[EMAIL PROTECTED]
>> I want to (if possible) create a table with a default timestamp in a
>> format other than "YYYY-MM-DD ..." per example below. I have tried a
>> few variants but always get same error.
>>
>> Can this be done and if so, how?
>>
>> create table (
>> custnum integer primary key not null,
>> note text,
>> stamp default (strftime('%s', current_timestamp))
>> );
>> SQL error: near "(": syntax error
>
> SQLite complains about the very first opening paren, the one right after
> "create table". You are missing the table name, as in "create table
> tableName ...". Once this is fixed, your statement works as written.
>
> Igor Tandetnik
Thanks Igor, I did eventually notice the missing tablename when I was
reworking that example last night with Simons trigger suggestion. I have
retested that example with a tablename and confirm that it does indeed work.
John
--
Regards
John McMahon
[EMAIL PROTECTED]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users