SQL Server Performance

XLOCK Hint is ignored even though specifying explictly?

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Sep 11, 2007.

  1. Anonymous New Member

    Interesting newbie question on the forums to share. I am selecting a value from a table(column).I do not want any 2 users can select same value at the same time..in other word 1 value only be selected by individual user. in order to do it I am simply using with (xlock) in select statement within begin tran...commit tran. In this way I am hoping to avoid above mentioned situation. But it is not working...as when I fire second select statement (without commit tran of first statement) for same rows...(<a href="http://sqlserver-qa.net/blogs/tools/archive/2007/09/11/xlock-hint-is-ignored-even-though-specifying-explictly.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=1981" width="1" height="1">

Share This Page