On Wed, 8 Oct 2008 12:11:04 -0700 (PDT), mmccaws2 <[EMAIL PROTECTED]> wrote:
> Hi > > I don't understand the error for this statement for SQLITE > > $dbh->do("ALTER TABLE new_definition ( > ADD COLUMN loopback TEXT)"); Remove those brackets from inside the SQL, ie: alter table new_definition add column loopback text; > Also additional question about SQLITE. I've been developing using > against a SQLITE db. I trimmed hundreds of entries out of table and > the count command returns values shows that the number of entries has > reduced. However the file doesn't reduce in size. Does SQLITE keep > the last greatest file size eventhough the table has been trimmed? > Or is there something else I need to do. I've only played around with SQLITE myself, but this is fairly common behaviour. Some DBs allow you to 'vacuum', 'compact', etc. Postgres for example can do this. MySQL can't ( for InnoDB anyway, not sure about other table types ). I would be surprised if SQLite supported this kind of thing. You will probably re-use the space when you insert more records, but the file size won't shrink when you delete. If you want to reclaim the space, you can dump the contents of the database to a text ( eg csv / SQL script ) file, delete the database, and then import your data again. Dodgy, but it works. Dan