Basically, I want something like this in standard sql or sqlite:
if(record exists)
{
UPDATE record row;
}
else
{
INSERT record;
}
I have tried using "IF EXISTS(SELECT * FROM table WHERE value = somevalue) UPDATE else INSERT
but this is not supported by standard sql or sqlite.