How do I add a new column in between two columns?

You have two options. First, you could simply add a new column with the following: ALTER TABLE {tableName} ADD COLUMN COLNew {type}; Second, and more complicatedly, but would actually put the column where you want it, would be to create the new table with the missing column and a temporary new name: CREATE TABLE {tempNewTableName} … Read more

Sqlite over a network share [closed]

My experience of file based databases (i.e. those without a database server process), which goes back over twenty years, is that if you try to share them, they will inevitably eventually get corrupted. I’d strongly suggest you look at MySQL again. And please note, I am not picking on SQLite – I use it myself, … Read more

is there a limit to the size of a SQLite database?

This is fairly easy to deduce from the implementation limits page: An SQLite database file is organized as pages. The size of each page is a power of 2 between 512 and SQLITE_MAX_PAGE_SIZE. The default value for SQLITE_MAX_PAGE_SIZE is 32768. … The SQLITE_MAX_PAGE_COUNT parameter, which is normally set to 1073741823, is the maximum number of … Read more

How to get a list of column names

SELECT sql FROM sqlite_master WHERE tbl_name=”table_name” AND type=”table” Then parse this value with Reg Exp (it’s easy) which could looks similar to this: [(.*?)] Alternatively you can use: PRAGMA table_info(table_name)