線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1627
推到 Plurk!
推到 Facebook!

請問在sybase中,holdlock命令的優缺點及使用時機.

尚未結案
jwj
一般會員


發表:2
回覆:1
積分:0
註冊:2003-05-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-05-31 11:50:19 IP:211.148.xxx.xxx 未訂閱
請問在sybase中,holdlock命令的優缺點及使用時機.
Mickey
版主


發表:77
回覆:1882
積分:1390
註冊:2002-12-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-02 10:21:23 IP:218.163.xxx.xxx 未訂閱
holdlock applies a read-lock on the data until the transaction ends.    holdlock -makes a shared lock on a specified table or view more restrictive 
by holding it until the completion of a transaction (instead of releasing the 
shared lock as soon as the required data page is no longer needed, whether or 
not the transaction has been completed).    使用時機 : 如計算庫存總量時, 限制計算當時之入/出庫資料交易.    Example Transcat-SQL :
begin
  declare @total_QTY float 
  begin tran
     select @total_QTY=sum(QTY) from Inventory holdlock 
     ...
  commit tran
end
系統時間:2024-05-18 11:54:52
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!