Hi guys,
I have this simple query:
INSERT INTO kunden (kundennr, art, firma, vorname, nachname, strasse_nr, plz, ort, email, telefon, ust_id, hrb_gericht, hrb_nr)
VALUES (
70, Verbraucher, , Vorname_anders, Nachname, Straße, 12345, Ort, email@email.de, +123456789, , , )
ON DUPLICATE KEY UPDATE art = Verbraucher, firma = , vorname = Vorname_anders, nachname = Nachname, strasse_nr = Straße, plz = 12345, ort = Ort, email = email@email.de, telefon = +123456789, ust_id = , hrb_gericht = , hrb_nr = ;
SET @kunden_id = LAST_INSERT_ID();
SELECT @kunden_id;
The primary key 70 does exist, therefore the query updates a row.
When I am running this query through Retool it returns 0 as the last id however when I am running the same query through MySQL Workbench it returns 70 as the last id.
Anyone know what the issue is?