我可以在不重新創建表的情況下動態更改索引的類型嗎? - Can I change the type of an index on the fly without re-creating the table? -开发者知识库

我可以在不重新創建表的情況下動態更改索引的類型嗎? - Can I change the type of an index on the fly without re-creating the table? -开发者知识库,第1张

I have always used a custom implementation of SQLite, and it had the "LATIN_NOCASE" collation. I am now using System.Data.SQLite, and it doesn't have this collation, as I have found out now.

我一直使用SQLite的自定義實現,它有“LATIN_NOCASE”排序規則。我現在正在使用System.Data.SQLite,它沒有這個排序規則,正如我現在發現的那樣。

I would therefore like to change all indexes from LATIN_NOCASE to NOCASE.

因此,我想將所有索引從LATIN_NOCASE更改為NOCASE。

Can I somehow do that with one line of code, or do I have to recreate the table / the indexes?

我可以用一行代碼以某種方式做到這一點,還是我必須重新創建表/索引?

1 个解决方案

#1


1  

SQLite is designed as a lightweight, embedded database where large changes to the database are not supposed to happen at runtime, so it has no ALTER INDEX command: http://www.sqlite.org/lang.html.

SQLite被設計為一個輕量級的嵌入式數據庫,其中數據庫的大量更改不應該在運行時發生,因此它沒有ALTER INDEX命令:http://www.sqlite.org/lang.html。

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复