all groups > sql server programming > april 2006 >
You're in the

sql server programming

group:

sqlite current_timestamp


sqlite current_timestamp Rain
4/29/2006 7:04:01 PM
sql server programming:
Hi, im hoping someone could help me with this problem. I would appreciate any
help at all:

SQLite said that it supports current_timestamp but it doesnt work when i use
it as a Default value, for example: (Im executing these sql statements in
sqliteqa)

1.drop table sample_table;
2.create table sample_table (table_no numeric(2,0) NOT NULL,
last_record_date datetime default current_datetime );
3.select * from sample_table;
4.delete from sample_table;
5.insert into sample_table(table_no) values(5);
6.insert into sample_table(table_no, last_record_date ) values(4,
'2006-04-30 12:12:13');

Number 5 doesnt seem to work and will produce an error saying that
CURRENT_TIMESTAMP is an unknown column when it is suppose to produce the
Re: sqlite current_timestamp Kalen Delaney
4/29/2006 8:14:05 PM
Hi Rain

This is a MSSQLServer forum, not a SQLite forum.

That being said, your create table is using current_datetime as the default
value, when you implied you meant to use current_timestamp.

--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com


[quoted text, click to view]

AddThis Social Bookmark Button