ASE 11.5:Deadlock detected during UPDATE.
UPDATE statements are in 2 different stored procedures which are executed
simultaneously. There are indexes on columns "used_by" and "reference".
_1.________________________________________________

update payments_reg
set used_by = null
where payments_reg.used_by = @p_usrid

_2._________________________________________________

update payments_reg
set used_by=@p_usr_id
where reference = @p_reference

___________________________________________________

Does anyone have an idea why a deadlock appears and how to cope with this
situation? I'll appreciate your help!

Best regards,
Tsvetomira Jordanova