.-CURRENT-. .-=-.
>>-SET--+---------+--LOCK TIMEOUT--+---+------------>
>--+-WAIT-----------------------+------------><
+-NOT WAIT-------------------+
+-NULL-----------------------+
| .-WAIT-. |
+-+------+-- integer-constant -+
'- host-variable --------------'
關于該命令的具體說明,請參見:http://publib.boulder.ibm.com/infocenter/db2help/topic /com.ibm.db2.udb.doc/admin/r0011874.htm?resultof= %22%73%65%74%22%20%22%63%75%72%72%65%6e%74%22%2 0%22%6c%6f%63%6b%22%20%22%74%69%6d%65%6f%75%74%22%20 下面通過一個例子來講解如何使用這個功能(我們使用SAMPLE數據庫): 1、使用"db2 +c"打開兩個DB2會話。(+c 參數關閉AUTOCOMMIT) 2、在一個會話中執行下面的語句: connect to sample create table test(id int,name char(10)) commit insert into test values(1,'test') 3、在另一個會話中執行下面的語句: connect to sample select * from test 由于默認LOCKTIMEOUT參數設置為-1,所以這個會話會一直等著,沒有結果返回。如下圖所示:新聞熱點
疑難解答