Re: Nuther sqLite gotcha

2011-03-23 Thread Bob Sneidar
I suppose if you had access to the master schema there might be something in there. I cannot tell because I am using On-Rev at the moment and don't have that kind of access. Bob On Mar 23, 2011, at 4:37 PM, Peter Haworth wrote: > OK, I knew about the SHOW CREATE TABLE command, but thought pe

Re: Nuther sqLite gotcha

2011-03-23 Thread Peter Haworth
OK, I knew about the SHOW CREATE TABLE command, but thought perhaps MySQL had the equivalent of the SQLite sqlite_master table 'table' entries. Pete Haworth On Mar 23, 2011, at 3:59 PM, Bob Sneidar wrote: > You would use SHOW CREATE TABLE devices (assuming your table was called > "devices").

Re: Nuther sqLite gotcha

2011-03-23 Thread Bob Sneidar
Well the issue comes into play because I am not the creator of the sqLite database, a company called Spiceworks is. I am reading their schema in order to import columns and even whole tables into my database. Bob On Mar 23, 2011, at 3:44 PM, Peter Haworth wrote: > Another thought on this tha

Re: Nuther sqLite gotcha

2011-03-23 Thread Bob Sneidar
You would use SHOW CREATE TABLE devices (assuming your table was called "devices"). For sqLite I use: put "SELECT name,sql FROM sqlite_master WHERE type='table' " into theSQL then I execute that. It's the only way I know of as sqLite does not have a SHOW CREATE TABLE context. Bob On Mar

Re: Nuther sqLite gotcha

2011-03-23 Thread Peter Haworth
Another thought on this that might help. The sqlite_master table has a column that holds the table name so you should be able to find the entry you need with a SELECT on column type='table' and column tbl_name=. No need to search the sql column that way. Pete Haworth On Mar 23, 2011, at 3:15

Re: Nuther sqLite gotcha

2011-03-23 Thread Peter Haworth
Hadn't noticed that. I'm pretty sure I've created all my SQLite tables through the FireFox SQLite Manager and it looks like it puts quotes around all the table names (and column names). Out of interest, where does mySQL store the SQL statements to create tables? (still finding my way around m