[EMAIL PROTECTED] wrote: > I am trying to create a table with a column with default value of current > datetime (on insertion). But the following sql script can pass, but does not > do what it is supposed to do. > > What is the correct syntax? > > create table ViewState > ( > session_id text not null, > viewstate_key text not null, > viewstate blob, > timestamp text default CURRENT_DATETIME > ) > ; > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >
You need to use CURRENT_TIMESTAMP as shown at http://www.sqlite.org/lang_createtable.html HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users