>>I have this SQL syntax and I need to know why they put WITH (UPDLOCK) in this statement. Please help
>>
>>
>>select aa.field_10 from mytable aa WITH (UPDLOCK)
>>
>>
>>Thanks,
>>Sam
>
>From SQL help ..
>
>Specifies that update locks are to be taken and held until the transaction completes.
I guess the first statement is taken from a longer procedure. Otherwise why would you use this hint with SELECT-SQL?
If it's not broken, fix it until it is.
My Blog