On duplicate statement

I think it will be useful for library. In our MMORPG project we use it for inserting (and then updating) daily statistics rows.