Search code examples
sqlitechecksum

How to checksum specifc table in SQLite?


In MySQL I can get the checksum of the table like:

CHECKSUM TABLE 'TableName'

How can I calculate check sum of the table in SQLite? Are there any alternatives?

EDIT: Will the SQLite checksum(calculated manually) be equal to MySQL checksum?


Solution

  • SQLite does not have a built-in checksum feature.

    You could either read all the data from the table and calculate a hash over the data yourself, or install triggers on every table that update a table checksum.