Let's imagine you have only SQL. You need some table where you should increment value in some property when you update this line.
We have the table
CREATE TABLE "test" ( "identifier" VARCHAR(200) NOT NULL, "value" INTEGER, PRIMARY KEY ("identifier") )
One important note, you can't use INSERT and UPDATE queries separately, only as INSERT OR UPDATE. And CREATE TABLE is the only way to create the class.
INSERT OR UPDATE INTO "test" ("identifier", "value") VALUES ('someid', 1)
How to increment property value with each update?
It's not a problem to just update a row which already exists.
UPDATE "test" SET "value" = "value" + 1 WHERE "identifier" = 'someid'