On Sun, Feb 16, 2003 at 23:51:49 -0500, Greg Stark <gsstark@mit.edu> wrote:
>
> Hm, odd, nobody mentioned this solution:
>
> If you don't have a primary key already, create a unique index on the
> combination you want to be unique. Then:
>
> . Try to insert the record
> . If you get a duplicate key error
> then do update instead
I think this solution depends on records not being deleted. Otherwise
a record could be deleted between the insert attempt and the update attempt.