How can I verify if the registry exists and then update it if it does not exist that I insert it?
I tried this, but it does not leave me.
UPDATE tienda SET Campo1 = 'carro' WHERE ID = '123'
IF @@ROWCOUNT = 0
INSERT INTO tienda VALUES ('coche','123')
even with this query
IF EXISTS(SELECT ID FROM tienda WHERE ID = '123')
UPDATE tienda SET Campo1 = 'carro' WHERE ID = '123'
ELSE
INSERT INTO tienda VALUES ('coche','123')
is an example, that's the format I used, I'm using mysql