Possible Duplicate:
INSERT IF NOT EXISTS ELSE UPDATE?
I want to check if a row (with it's ID) exists in a database, if yes, I want to update the column category, if it does not exist, i want to add a new row. Is this possible via a single query in sqlite (will be applied inside eclipse using java for an android app)