Re: [sqlite] drop table question ?

2009-02-04 Thread Ribeiro, Glauber
You may not have a column name; it might be a calculated column; for example, count(*) g -Original Message- From: John Machin [mailto:sjmac...@lexicon.net] Sent: Tuesday, February 03, 2009 2:05 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] drop table question

Re: [sqlite] drop table question ?

2009-02-03 Thread John Machin
On 4/02/2009 12:37 AM, Brad Stiles wrote: >>> For my own edification, why the "order by 1" clause? >> To sort them in ascending order of table name, which might make >> old-fashioned capers like visual scrutiny a little easier. > > OK then, why would one not use the column name? Maybe because

Re: [sqlite] drop table question ?

2009-02-03 Thread P Kishor
On Tue, Feb 3, 2009 at 10:36 AM, Brad Stiles wrote: >>> >> For my own edification, why the "order by 1" clause? >>> > >>> > To sort them in ascending order of table name, which might make >>> > old-fashioned capers like visual scrutiny a little easier. >>> >>> OK then,

Re: [sqlite] drop table question ?

2009-02-03 Thread Brad Stiles
>> >> For my own edification, why the "order by 1" clause? >> > >> > To sort them in ascending order of table name, which might make >> > old-fashioned capers like visual scrutiny a little easier. >> >> OK then, why would one not use the column name? > > It does. No, I meant why not use the

Re: [sqlite] drop table question ?

2009-02-03 Thread Brad Stiles
On Tue, Feb 3, 2009 at 10:28 AM, Jay A. Kreibich wrote: > On Tue, Feb 03, 2009 at 08:37:10AM -0500, Brad Stiles scratched on the wall: >> >> For my own edification, why the "order by 1" clause? >> > >> > To sort them in ascending order of table name, which might make >> >

Re: [sqlite] drop table question ?

2009-02-03 Thread Jay A. Kreibich
On Tue, Feb 03, 2009 at 08:37:10AM -0500, Brad Stiles scratched on the wall: > >> For my own edification, why the "order by 1" clause? > > > > To sort them in ascending order of table name, which might make > > old-fashioned capers like visual scrutiny a little easier. > > OK then, why would one

Re: [sqlite] drop table question ?

2009-02-03 Thread Wilson, Ron P
, February 03, 2009 9:35 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] drop table question ? You will have to do this with code. select name from sqlite_master where name like 'x%'; that will give you a list of all tables that start with x; you can then delete all tables

Re: [sqlite] drop table question ?

2009-02-03 Thread Wilson, Ron P
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of baxy77bax Sent: Tuesday, February 03, 2009 4:08 AM To: sqlite-users@sqlite.org Subject: [sqlite] drop table question ? hi simple question : How to drop all tables in my database

Re: [sqlite] drop table question ?

2009-02-03 Thread P Kishor
On Tue, Feb 3, 2009 at 8:37 AM, Brad Stiles wrote: >>> For my own edification, why the "order by 1" clause? from the docs... http://www.sqlite.org/lang_select.html Each term of an ORDER BY expression is processed as follows: If the ORDER BY expression is a constant

Re: [sqlite] drop table question ?

2009-02-03 Thread Brad Stiles
>> For my own edification, why the "order by 1" clause? > > To sort them in ascending order of table name, which might make > old-fashioned capers like visual scrutiny a little easier. OK then, why would one not use the column name? /bs ___

Re: [sqlite] drop table question ?

2009-02-03 Thread Brad Stiles
> 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; For my own edification, why the "order by 1" clause? /bs ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] drop table question ?

2009-02-03 Thread John Machin
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

Re: [sqlite] drop table question ?

2009-02-03 Thread baxy77bax
i was thinking the same thing but then it hit me that maybe there is already an existing solution. :) thanx RB Smissaert wrote: > > Run a loop in the code of your application and drop the tables. I don't > think SQLite can do something like this. > > RBS > >> >> hi >> >> simple question :

Re: [sqlite] drop table question ?

2009-02-03 Thread bartsmissaert
Run a loop in the code of your application and drop the tables. I don't think SQLite can do something like this. RBS > > 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 > ... > > thanx >

[sqlite] drop table question ?

2009-02-03 Thread baxy77bax
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 ... thanx -- View this message in context: http://www.nabble.com/drop-table-question---tp21806118p21806118.html Sent from the SQLite mailing list