Im bir isim "jack" demek için sütun 'Rname' tablo 'kişilerin' kontrol ve eğer varsa o başka o sıra yeni Rname ile yeni bir satır INSERT GÜNCELLEMEYİ bir SQL sorgusu yazmaya çalışıyorum.
I’v been trying out IF/ELSE statements but haven’t really seen how they work. Or is there a better way to do what I want without If/ELSE? (I haven’t done much of this SQL work, I used to only do UPDATE, INSERT, DELETE, ALTER… that kinda of stuff.
Ben şimdiye kadar bu var: (jack Rname satırda bulunursa eğer yeni satır INSERT başka, güncellemek)
SELECT * FROM persons IF 'jack' == rName BEGIN [UPDATE Statement] END ELSE BEGIN [ INSERT Statement] END
Edit: I don’t think I quite explained what I wanted, rName should all be unique names, no 2 should be the same. I’v tried ON DUPLICATE KEY UPDATE, but it seems to just inserts a new row with the new data. But I want it to update the already existing rName (jack) row with the new data, the rName (jack) should stay the same but other fields in that row should be updated to the new data provided.