Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updlock?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01229047
Message ID:
01229068
Vues:
16
>>>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?

I think so.

I've never used that hint though, it may in fact work for the duration of the Select by itself as well meaning there will be no updates during what may be a long Select..Not sure on that.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform