On 3/02/2009 8:07 PM, baxy77bax wrote: > hi > > simple question : How to drop all tables in my database that start , for > example, with X? > > table 1 is X1998 > table 2 is X8676 > table 3 is X2912 > ... >
Catch the output of this: sqlite> select 'drop table ' || name || ';' from sqlite_master where type = 'table' and name glob 'X[0-9][0-9][0-9][0-9]' order by 1; check it carefully feed it back in Note: GLOB lets you be more precise than LIKE. Precision when dropping tables is a Good Thing :-) HTH, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users