Hi,

I hope I haven't missed something in the documentation, but I can't find a 
statement to return a column value to its default.

If I have the following table:

CREATE TABLE tab (col TEXT DEFAULT "some_default", ....);

I can insert with defaults using

INSERT INTO tab DEFAULT VALUES

But there doesn't seem to be a corresponding

UPDATE tab SET col DEFAULT VALUES

or 

UPDATE tab SET col = DEFAULT

(the latter statement was thrown up by Google as the way to do it on another 
database architecture - Microsoft's I think).

Is it possible to do this in sqlite?  I know it would be possible to simply 
hard-code the default value into the UPDATE statement, but this would mean when 
updating the default in the table declaration, I then need to make sure all the 
UPDATEs match!

Thanks
Andy
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to