I have few sqlite database files. I want to know the database file version i.e if the database was created with sqlite2 or sqlite3 or any other main/sub version (not the sqlite library or driver or user_version or schema_version).
相关问题
- NOT DISTINCT query in mySQL
- SQL/SQL-LITE - Counting records after filtering
- Flush single app django 1.9
- keeping one connection to DB or opening closing pe
- What SQLite NuGet package do I need
Check manual file
sqlite3.version The version number of this module, as a string. This is not the version of the SQLite library.
sqlite3.version_info The version number of this module, as a tuple of integers. This is not the version of the SQLite library.
sqlite3.sqlite_version The version number of the run-time SQLite library, as a string.
sqlite3.sqlite_version_info The version number of the run-time SQLite library, as a tuple of integers.
You can get version number of a database file by the
Magic Header String
:The easier way is using the
file
command:If you have a data connection to it in Visual Studio, you can right click on the data base in Server Explorer, select properties, and the version will be shown in the properties window, (under Version, surprisingly). You might need to left click the database first to open it.
You can write this command in any sqlite explorer which will give the sqlite version
Get user_version: run sql:
PRAGMA user_version;
Get schema_version:
PRAGMA schema_version;
When create database file (.db), user_version can be set by user.
The correct answer from version 3 is: