SQLite - alter a table's column type?

后端 未结 4 1897
醉话见心
醉话见心 2020-12-25 12:25

I am starting a project involving a small database and I am considering to use SQLite. If I create a table and I defined one of the columns as text, but all the values stor

4条回答
  •  醉酒成梦
    2020-12-25 12:31

    No, there is no "quick" way to do this with SQLite. Not like you can with MySQL. You will have to drop the table, then re-add it.

    Another thing to keep in mind is that SQLite is pretty flexible about the type of data that you can put into each section. Here is a link that describes the datatypes, and how they work: http://www.sqlite.org/datatype3.html

    Another option might be to use MySQL if the feature you are speaking of is a big deal to you. It's still free and is great for small projects.

提交回复
热议问题