Andrea Chiado' Piat wrote: > Hi, > > I tried this from 2 SqlStudio sessions: > > 1st connection: > select * from mytable where codice='123' with lock (nowait) > > result > ------ > something > > from 2nd connection i run > update mytable set myfield='somethingelse' > and SapDb say me that there is a lock collision. It's ok > > but if I run > select * from mytable where codice='123' with lock (nowait) > returns me 1 record. > > Why doesn't it return me an error of a lock collision?
Because both locks are share (select) - locks, which do not collide. Only exclusive (insert/update/delete) - locks collide with share or other exclusive locks. To disallow any other user to select a record, you have to lock it exclusive. Elke SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
