On Sun, Oct 26, 2014 at 10:32 AM, Clemens Ladisch <clem...@ladisch.de>
wrote:

> Charles Samuels wrote:
> > On Saturday, October 25, 2014 05:31:35 AM Richard Hipp wrote:
> >> However, when updating a row, SQLite rewrites the entire row.
> >
> > Does this still apply if the column was added due to "alter table X add
> > column"? I ask because it was my understanding that alter table added the
> > extra column "elsewhere".
>
> It adds the extra column "nowhere".  When SQLite reads a table row has
> fewer columns than in the CREATE TABLE statement, the remaining columns'
> values are assumed to have their default values.
>
>
That is interesting; so if I alter the default values, all rows that
existed before the column added and the default change get the changed
value? .


> When a row is (re)written, all columns are written (even those that
> happen to have default values).
>
>
> Regards,
> Clemens
> _______________________________________________
> 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