I have a update query which updates customer status by their unique customer id at several levels of application flow. I have following exception several times in my application logs
Transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
My update query is as follows:
UPDATE customer SET status= ? WHERE cust_id = ?
I guess it's because of table level locking but i didn't enabled it. My question is does table level locking is enable by default? Will implementing row level locking will help me to resolve this situation? How do i enable row level locking for this query? thanks