At 7:10 PM -0700 8/17/05, Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very close,
At 19:10 -0700 8/17/05, Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
Isn't that how INSERT works already?
If what you mean is that you want no error to occur, perhaps you want
to use INSERT IGNORE instead.
http://de
Daevid Vincent wrote:
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very close,
but I want it to do nothin
Does mySQL have a way to INSERT a new record if one doesn't exist (based
upon primary compound key)?
I see this "EXISTS" but not an example of how to use it with INSERT.
I see "INSERT... ON DUPLICATE KEY UPDATE col_name=expr" which is very close,
but I want it to do nothing on duplicate key. :(