On Tue, Feb 02, 2010 at 10:35:22AM +0800, hongbin.gao scratched on the wall: > Usually, in SQL-server 2000, when I update fields of the table, I can use > such sql statement: > > > > if not EXISTS(select T.[name],F.[name] from sysobjects T left join > syscolumns F on T.[id]=F.[id] where T.[name]='table_A' and > F.[name]='field_A') > > alter table table_A add field_A varchar(20) not null default '' > > go > > But, how can I do in sqlite ?
PRAGMA table_info() http://www.sqlite.org/pragma.html#pragma_table_info You'll have to do it in your own code, but the info is there. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users