I have a sqlite table that was originally created with:
PRIMARY KEY (`column`);
I now need to remove that primary key and create a new one. Creating a new one is easy, but removing the original seems to be the hard part. If I do
.indices tablename
I don’t get the primary key. Some programs show the primary key as
Indexes: 1
[] PRIMARY
The index name is typically in the [].
Any ideas?
You can’t.
will give you a list of indices. This will include the automatically generated index for the primary key which will be called something like
'sqlite_autoindex_MyTable_1'.But unfortunately you cannot drop this index…
All you can do is re-create the table without the primary key.