This is the traditional and safest way. You save a step(s) and processing if you RENAME existing_table to newTable, but I'm not sure if sqlite supports RENAME.
>>-----Original Message----- >>From: jim [mailto:[EMAIL PROTECTED] >>Sent: Monday, January 26, 2004 7:25 PM >>To: [EMAIL PROTECTED] >>Subject: [sqlite] modify structure and then rename >> >> >>hi- >> >>i was thinking i could use this process. >>I tried it before it posted and it seems to work. >> >> >>1) CREATE TABLE table-name newTable >> based on the modifications the user requests to the existing_table >>structure found in select sqlite_master.sql from sqlite_master where >>name = 'existing_table' >> >>2)do an insert of all data from the original table into temporary table >> >>3) drop table existing_table >> >>4) >>CREATE TABLE existing_table AS select * from newTable >> >> >>is there a better way or is this an ok way to do it?? >> >>I found out today that I cant modify sqlite_master.sql or I cant simply >>issue a new create table statement when the table already exists to >>change the structure. >> >> >>thanks, >>marvin >> >> >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]