Subject Re: [firebird-support] MS SQL Server stored procedure to Firebird
Author Ann W. Harrison
Dimitry Sibiryakov wrote:
> 10.06.2010 22:42, Ismael L. Donis GarcĂ­a wrote:
>> I in what's personal make a select before the first insert to verify that
>> the user does not exist already.
>
> Do you think that MS SQL users aren't aware of unique constraints?..

The problem with putting a select in a procedure to avoid attempting
to store a duplicate record is that it won't detect a duplicate stored
by a concurrent transaction. The primary key or unique constraint -
or unique index - will, but having had the select return a count of
zero isn't a guarantee. That is a difference with MS SQL - at least
if your run MS SQL transactions in serializable mode.


Cheers,

Ann