There are some applications where using a 3rd party utility is
inherently awkward and time consuming, but using your application that
uses the sqlite api is not.  (For example, you can change your code
via an automatic update mechanism, but perhaps can't execute a 3rd
party tool that likely isn't on the user's system anyway.)

"Use some 3rd party utility" isn't really an answer to "Why can't I
use this command?".   The OP didn't ask how can they alter the table,
they know how.

The lack of ALTER TABLE means that your application would have to do
it  This is simple enough to do, but means you have to write your own
implementation of alter table, to some degree of complication or
duplication, and of course with more lines of code comes an increased
risk of writing a new bug.

The why seems to be something about the necessity of rewriting the
table, which is 'slow'.  I expect that users accept that Alter table
can be expensive.    Is there more to it? Some sort of ACID breakdown?

regards,
Adam DeVita


On Tue, Oct 9, 2012 at 12:45 PM, Peter Haworth <p...@lcsql.com> wrote:
> Pete
> lcSQL Software <http://www.lcsql.com>
> You're probably already aware of this but there are third party tools
> available that will do this for you, plus many other schema maintenance
> functions that aren't provided in sqlite.
>
> One such is my SQLiteAdmin program, available at www.lcsql.com.
>
>
> On Tue, Oct 9, 2012 at 9:00 AM, <sqlite-users-requ...@sqlite.org> wrote:
>
>> Message: 11
>> Date: Mon, 08 Oct 2012 21:57:21 +0200
>> From: Yves Goergen <nospam.l...@unclassified.de>
>> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
>> Subject: [sqlite] Why can't SQLite drop columns?
>> Message-ID: <50733021.8020...@unclassified.de>
>> Content-Type: text/plain; charset=UTF-8
>>
>> Hello,
>>
>> I know that SQLite doesn't support ALTER TABLE DROP COLUMN, unlike
>> probably every other SQL database system. But every time I come across
>> this, I feel the pain of having to write huge amounts of code to
>> automatically remove single columns in a table. When doing that in code,
>> it's usually working non-interactively on some generic table schema and
>> cannot use hard-coded column names. So I really have to collect all
>> relevant data including foreign keys and all column attributes and then
>> generate the right SQL code to copy everything right except the dropped
>> column.
>>
>> I very much believe that it would save a lot of developers' resources if
>> SQLite supported that directly. After all, the DBMS has all the data it
>> needs in its readily readable data structures. It would possibly be less
>> work for SQLite than for anybody using it.
>>
>> So I am asking: Why does SQLite still not support dropping columns
>> through SQL after all these years? Do the SQLite developers have strong
>> arguments against it, and which? Are there technical limitations (I
>> can't believe that)? Is there some kind of religion behind it?
>>
>> --
>> Yves Goergen - nospam.l...@unclassified.de - http://unclassified.de
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to