Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Rowlocking in SQL server

Author  Topic 

sguerra
Starting Member

3 Posts

Posted - 2005-09-23 : 19:38:40
I need to know how does sql server locks the rows of a select.

With a statement like this:
**************************************
BEGIN TRAN

select max(numero_reg)
from cont_registro with (holdlock,rowlock)
where serial_dia = 15

//// do my stuff

COMMIT TRAN
**************************************

Is sql server locking all the rows of the where clause
"where serial_dia = 15"

OR

Is sql server locking ONLY one row that complies whit
"max(numero_reg)" and has "serial_dia = 15"

Please help

Santiago G.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-09-23 : 19:44:26
Duplicate:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55614

Tara
Go to Top of Page
   

- Advertisement -