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".

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


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