Say we have a table like:
CREATE TABLE example (
animal VARCHAR NOT NULL,
color VARCHAR NOT NULL,
name VARCHAR,
UNIQUE(colA, colB))
And we then do command like:
INSERT OR REPLACE INTO example (animal, color, name)
VALUES ("animal", "cat", "mittens")
Is there a way to tell if the value of the entire row changed at all? For example, if before this command, the table had the following row:
animal = "cat", color = "orange", name = NULL
It would have changed, since name
changed.
But if the row before the command was already:
animal = "cat", color = "orange", name = "mittens"
Then there would be no changes.
Sadly, it seems that the changes()
function returns 1
in both of these cases. Is there something that would indicate that some value actually changed, or what column(s) changed?