On 10/8/12, Petite Abeille <petite.abei...@gmail.com> wrote: > How do they deal with constraints? triggers? indexes? others? > If this was as straightforward as a 'create table bar as select a, b, c from > foo; drop table foo; alter table bar rename to foo;', we would most likely > not having this conversation :)
I'm sorry for not being more comprehensive in my answer. Also, as I pointed out, I can only speak for SQLiteStudio -- there are other tools; you need to investigate for yourself. When dropping a column from a table, SQLiteStudio preserves the original table's primary key, foreign keys, null constraints, defaults, check constraints, unique constraints, and indexes on columns other than the one being deleted. At _least_ that much. I confess I've never done an exhaustive exploration of what it preserves -- I only look for the things I need preserved in my applications. I haven't come across anything I need that it doesn't preserve, but I confess I haven't tried it with triggers or that really powerful SQL92 "others" functionality that you asked about. :) Honestly, I wouldn't even have recommended SQLiteStudio or tools like it if my experience was that all it did was "create table bar select from foo", but I can see it would have made my earlier post more clear if I had mentioned this from the start. And, as I said, SQLiteStudio isn't the only SQLite db manager out there; I suggest that you take them each for a spin and come to your own conclusions. But my point was that there are third party tools that might be able to give you a robust DROP COLUMN capability -- and maybe other functionality that SQLite can't do itself -- without your having to reinvent the wheel. Might. gs _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users