> > Have you checked your table afterwords to ensure you don't have any nulls in > IsReplaced? > > select count(IsReplaced) from mytable where IsReplaced is null; > > I tested and the alter table does fill with default values for me. At least > from the sqlite shell. > > Does this work for you? Are you doing the alter table via your program or > via the shell? > > 3.7.9 > > sqlite> create table t(a integer); > sqlite> insert into t values(1); > sqlite> insert into t values(2); > sqlite> alter table t add column b boolean not null default 0; select * > sqlite> from t; > 1|0 > 2|0 >
Hi Michael, i alter it with a tool names "SQLITE Meastro" don't know with shell version the used. So what you say it that "alter table t add column b boolean not null default 0;" normaly replace all null fields with default value? Then I think its comes from my tools. But I always thought that all existing field still stays NULL and sqlite only returns default value for these. Steffen
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users