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 various syntaxes at http://www.w3schools.com/SQL/sql_drop.asp -


DROP INDEX index_name ON table_name 
DROP INDEX table_name.index_name
ALTER TABLE table_name DROP INDEX index_name

Given the existing syntax of "DROP INDEX index_name" the first format
would seem to be most useful.

I note that SQLite prevents creation of indexes with the same name,
regardless of table.


Also, is there any good reason for creating a primary key versus creating
a separate index afterwards? Primary keys can't be deleted so if I have
to modify one, the complete table has to be dropped and re-created,
including copying all the data.

If, for example, I had a compound index on multiple fields and made it
the primary key, or had a text field as the primary key,
http://www.sqlite.org/lang_createtable.html says that an automatically
generated integer will be used as the B-tree key. So in this case it
would appear that the primary key has no special function. Am I missing
something here? Why can't they be dropped? (To test this I used
SqliteExplorer and accessed the default name of the primary key index,
and tried to drop that.)

Hugh
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to