Hi Nige, create table <new_name> as select * from <old_table>
See also http://www.sqlite.org/lang_createtable.html Martin Am 26.03.2015 um 16:29 schrieb Nigel Verity: > Hi > > I know this must seem a fairly dumb question, but I can't find an easy way to > create a copy of table using just SQL. > > My requirement is to take periodic snapshots of a names and addresses table, > to be stored in the same database as the master. > > The master table has one index - an auto-incrementing integer ID (non NULL, > primary key). There is no need for the corresponding field in the snapshot to > be indexed, but the integer ID does need to be copied across. > > I'm happy to copy the table structure in one operation and the data in > another, but if it can be done in a single operation so much the better. > > Thanks > > Nige > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users -- *Codeswift GmbH * Kr?utlerweg 20a A-5020 Salzburg Tel: +49 (0) 8662 / 494330 Mob: +49 (0) 171 / 4487687 Fax: +49 (0) 3212 / 1001404 engelschalk at codeswift.com www.codeswift.com / www.swiftcash.at Codeswift Professional IT Services GmbH Firmenbuch-Nr. FN 202820s UID-Nr. ATU 50576309