For lock the record I use:select * from orders where id = 17 for update
in this way lock the record with id = 17.If an other user demands the same record as I can understand that it is lock?
Thanks a lot.