I want to use a two-column table to maintain instance counts for distinct strings.
The first column will contain a particular string, and the second will contain a count for it.
For example, two rows might be:
"CAT", 1 "DOG", 3
I'll write a stored procedure to which the caller passes a string. That stored procedure must first determine how many existing instances are in the database. Then it must update the database to have one more than that.
How can I write my stored procedure so that multiple clients can call it at the same time without overwriting each other's work?