Re: [sqlite] Dropping and creating indexes

2008-11-20 Thread Dan
On Nov 20, 2008, at 4:39 PM, Hugh Gibson wrote: >>> According to Igor all that happens when you create a primary >>> key is that an index with the unique constraint is created. And >>> the only good reason for not being able to drop it, as far as I >>> can tell, is so that the SQL statement

Re: [sqlite] Dropping and creating indexes

2008-11-20 Thread Hugh Gibson
> > According to Igor all that happens when you create a primary > > key is that an index with the unique constraint is created. And > > the only good reason for not being able to drop it, as far as I > > can tell, is so that the SQL statement stored for the table is not > > made invalid. > >

Re: [sqlite] Dropping and creating indexes

2008-11-19 Thread P Kishor
On Wed, 19 Nov 2008 06:59 + (GMT Standard Time), Hugh Gibson <[EMAIL PROTECTED]> wrote: > > An index is actually indeed associated with a table, and within that > > table with one or more columns. > > > > Hence, dropping an index doesn't require a table name. > > > I can easily write SQL

Re: [sqlite] Dropping and creating indexes

2008-11-19 Thread Hugh Gibson
> > SQLite will complain because of the duplicate index names, but in > > other database packages it will be accepted. You then have to > > specify the table name when deleting indexes. > > The only database I'm aware of that does this is SQL Server. > Don't overgeneralize. :) No worries - I

Re: [sqlite] Dropping and creating indexes

2008-11-19 Thread Thomas Briggs
> SQLite will complain because of the duplicate index names, but in other > database packages it will be accepted. You then have to specify the table > name when deleting indexes. The only database I'm aware of that does this is SQL Server. Don't overgeneralize. :) -T

Re: [sqlite] Dropping and creating indexes

2008-11-18 Thread Hugh Gibson
> An index is actually indeed associated with a table, and within that > table with one or more columns. > > Hence, dropping an index doesn't require a table name. I can easily write SQL like this: CREATE TABLE First (nID, nValue) CREATE INDEX idxID ON First (nID) CREATE TABLE Second (nID,

Re: [sqlite] Dropping and creating indexes

2008-11-18 Thread P Kishor
I am treading on uncharted waters (for me), but my understanding is that... On Tue, 18 Nov 2008 08:07 + (GMT Standard Time), Hugh Gibson <[EMAIL PROTECTED]> wrote: > > > I note that SQLite prevents creation of indexes with the same > > > name, regardless of table. > > > > Quite. So it's

Re: [sqlite] Dropping and creating indexes

2008-11-18 Thread Hugh Gibson
> > I note that SQLite prevents creation of indexes with the same > > name, regardless of table. > > Quite. So it's unclear why you would want to be able to mention > table name in the DROP INDEX statement. Fair enough! It does seem strange when an index is associated with a single table to

Re: [sqlite] Dropping and creating indexes

2008-11-17 Thread Igor Tandetnik
"Hugh Gibson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I see from the syntax of DROP INDEX that a table name is not > specified. Are there any plans for adding a way of specifying the > table? > > I note that SQLite prevents creation of indexes with the same name, > regardless

[sqlite] Dropping and creating indexes

2008-11-17 Thread Hugh Gibson
We implement automatic instructions to upgrade a database schema. These include modifying field values and adding/dropping fields, tables, indexes etc. I see from the syntax of DROP INDEX that a table name is not specified. Are there any plans for adding a way of specifying the table? There are