Re: How do "locks" work when doing deletes?
Posted in 1996
In article <31C1DFF5.2E7F@PacBell.COM>, "Dave K. Lahoti" <D4kLaho@PacBell.COM> writes >Hi all, > >Looking for a few simple answer here (at least I believe they are). > >If I have a table having say a million rows called "ttable", and 2 >users simultaneousIy execute a "delete from ttable;" command, will >there be any table locks involved. . . > >a) . . .if the database has logging? > >b) . . .if the database does not have logging? > >c) . . .or how about if I have only 1 user performing the command? > Would that make a difference with respect to a) & b)? > >TIA One thing I did find was that if you do a delete which does not find anything to delete on a table with LOCK MODE PAGE it will lock the whole table page by page. This did cause me problems when I had a update/insert routine which deleted and then inserted a new person. Removing the unneccessary deletes stopped the problem - don'u use just luv fixed other people's code??? -- David Williams