On Sun, Dec 02, 2012 at 12:52:33PM -0800, Igor Korot scratched on the wall: > Jay, > > On Sun, Dec 2, 2012 at 12:16 PM, Jay A. Kreibich <j...@kreibi.ch> wrote: > > On Sun, Dec 02, 2012 at 11:58:54AM -0800, Igor Korot scratched on the wall: > >> Hi, ALL, > >> ALTER TABLE <table_name> command does not support changing the field type. > >> > >> What is the easiest and fastest way to change the field type from > >> integer to double? > > > > The easy, fast, and dangerous method is to edit sqlite_master directly. > > ;-) > I thought that the word "safest" is explicit. Guess not...
Life is short. > So, does this mean that I need to drop the DB in the text file, edit > it and then re-create it from this file? That's the safest, but it might not be the fastest. Without the FK, it would normally be a simple matter of creating the new table, copying the data with a INSERT...SELECT (which should auto adjust the types), then swapping the tables. I'm not sure of the FK will allow you to do that or not. Worth a shot before you dump the whole database... you might need to update both tables at the same time within a transaction. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users