santiagoguinle commented on issue #11418:
URL: https://github.com/apache/druid/issues/11418#issuecomment-876485427


   @FrankChen021 thanks for your answer! i am not also a SQLServer expert but i 
found some explanations about this issue
   
   Acording to this: 
https://stackoverflow.com/questions/1483725/select-for-update-with-sql-server
   
   An aproximated solution for "FOR UPDATE" in SQLServer is using "WITH 
(UPDLOCK)" but in fact if you want to just lock some specific rows then you 
need to define an index and use it on the same SQL expression.
   
   For example create an index like this:
   
   CREATE INDEX TBLINDEX ON TBL ( id )
   
   and then lock only row with id 10 doing this:
   
   SELECT * FROM TBL WITH (UPDLOCK, INDEX(TBLINDEX)) WHERE id=10.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to