Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum



Reply
 
LinkBack Thread Tools Display Modes
Old 2010-03-07   #1 (permalink)
Ingres Community
 
Join Date: Jan 2010
Posts: 25
Default row lock

which statement can replace the sql of SQL Server " select * from table with (rowlock) where id=10;" in ingres?
jerryzhang83 is offline   Reply With Quote
Old 2010-03-07   #2 (permalink)
Ingres Community
 
kschendel's Avatar
 
Join Date: Mar 2007
Location: Pittsburgh, PA
Posts: 1,230
Send a message via Skype™ to kschendel
Default

set lockmode on table xxx where level = row;
select * from table where id = 10;

More precisely, there is no direct equivalent. Ingres does not allow specification of the lock-level on the select statement (for perfectly good implementation reasons; I'm mildly surprised SQL Server allows it). You define the lock level (table, page, row, in 10.0 mvcc) at the transaction level to Ingres and the DML in the transaction obeys that directive.
kschendel is offline   Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved