Forum Moderators: open

Message Too Old, No Replies

Updating and inserting records in MySql

         

robjones2

3:40 am on Jan 16, 2006 (gmt 0)

10+ Year Member



Quite new to using MySQL with VB.

I am using UPDATE with a unique key to update existing records, but I want it to also insert new records that dont exist.

Whats the easiest way to do this?

coopster

3:40 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



INSERT ... ON DUPLICATE KEY UPDATE ... [dev.mysql.com] often works well in this situation.