Refactor with Locking Hints (ROWLOCK/NOLOCK)

Refactors and formats SQL code.

Moderators: Chris Auckland, David Atkinson, Anu Deshpande, Luke Jefferson

Refactor with Locking Hints (ROWLOCK/NOLOCK)

Postby jvlake » Wed Apr 07, 2010 12:22 am

I would like to be able to refactor with locking hints...

i.e.

UPDATE mytable WITH (ROWLOCK)
SELECT ID FROM mytable WITH (NOLOCK)

This would be a good extra refactoring and take the count up from only 11 refactors


I'm aware that some folk don't agree that locking hints are needed, but I'm using this tool in a work envirionment and the use of hints is mandated.

--------------------------


Also converting x.id = y.id to inner join syntax as a refactor
jvlake
 
Posts: 5
Joined: Wed Apr 07, 2010 12:14 am

Postby Brian Donahue » Thu Apr 08, 2010 4:39 pm

Thanks for your forum post. I have logged an enhancement request (SSR-881) for locking hints.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Refactor 1

Who is online

Users browsing this forum: No registered users and 0 guests