MYSQL ON DUPLICATE KEY UPDATE with more than one key? -


say have record id=1, b=20 , c=30. id primary key. insert database new record if there no record b=20 , c=30. far have set primary key id b & c? how can query? thank you.

you can create unique key on b , c with.

alter table mytable add unique myindex(b,c); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -