The file header contains the SQLite version that most recently modified 
the schema. You can see this using the cli, but not a pragma.

If you are willing to dig a bit, you can retrieve it by reading the 
first 100 bytes or so from the file and examining the 4 bytes at offset 
96. It's a big-endian 32-bit integer containing the version, and also 
another 32-bit integer (4-byte) value just prior at offset 92 is a 
counter of how many changes were made since using that library version. 
Together these can be quite useful information.

The Integer value of the version would be a number like this: 3012034 - 
starting with a 3 always for SQLite3 and then the next 3 digits the 
minor version (12 in the example) and the last 3 the release (34 in the 
example).

For more information on values stored in the header - see here:
https://www.sqlite.org/fileformat2.html#database_header

Cheers,
Ryan


On 2016/05/05 6:22 PM, Cecil Westerhof wrote:
> 2016-05-05 18:15 GMT+02:00 Cecil Westerhof <cldwesterhof at gmail.com>:
>
>> I know how to get the version of the running version of SQLite, but is
>> there a way to get the version with which the database was created?
>>
> ?With the command line program I can get it with:
>      .dbinfo
> one of the things it gives is:
>      software version:    3008010
> so it is 3.8.10,but would it also be possible to get in my Java program?
>

Reply via email to