Hello Puneet,

  I guess I can select and reinsert all columns except for the column with
the default value.
I guess it would be nice (efficient) to update a single column to its
default value via the update command.

Thanks,
-Alex

On Tue, Mar 25, 2008 at 1:40 PM, P Kishor <[EMAIL PROTECTED]> wrote:

> On 3/25/08, Alex Katebi <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  I was woundering how I can update a column in my table back to its
> default
> >  value.
> >
> >  For example:
> >
> >  create table t1 (value integer default 55, name text);
> >  insert into t1(name) values('hello');
> >  update t1 set value=default;  /* for illustration only */
>
> you do realize that the above update will try to update the value of
> the column 'value' to the value of a mysterious column called
> 'default'. Still, going on...
>
> >
> >  How can I achive the desired behavior short of doing "update t1 set
> >  value=55"
> >
>
> insert into t1(name) values('hello');
>
> automatically sets the value of the column called 'value' to 55, so
> your question is answered by exactly what you are doing.
>
>
> >  Thanks,
> >  -Alex
>
>
> --
> Puneet Kishor
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to