declare @spid int,@bl int
DECLARE s_cur CURSOR FOR
select 0 ,blocked
from (select * from sysprocesses where blocked>0 ) a
where not exists(select * from (select * from sysprocesses where blocked>0 ) b
where a.blocked=spid)
union select spid,blocked from sysprocesses where blocked>0
OPEN s_cur
FETCH NEXT FROM s_cur INTO @spid,@bl
WHILE @@FETCH_STATUS = 0
begin
if @spid =0
select N'引起數據庫死鎖的是:
'+ CAST(@bl AS VARCHAR(10)) + N'進程號,其執行的SQL語法如下'
else
select N'進程號SPID:'+ CAST(@spid AS VARCHAR(10))+ N'被進程號SPID:'+ CAST(@bl AS VARCHAR(10)) +N'阻塞,其當前進程執行的SQL語法如下'
DBCC INPUTBUFFER (@bl )
FETCH NEXT FROM s_cur INTO @spid,@bl
end
CLOSE s_cur
DEALLOCATE s_cur
if(typeof a1=='undefined'){
:
:
}
$('input[type="text"]').bind('keypress', function (e) {
if (e.which == 13) return false;
});
var Data = [{"key": "key5", "value": "value5"}, {"key": "key4", "value": "value4"}, {"key": "key3", "value": "value3"}];
var html = [];
html.push('<select name="test">');
for (var i = 0; i < Data.length; i++) {
html.push('<option value="' + Data[i]["key"] + '">',
Data[i]["value"],
"</option>");
}
html.push('</select>');
return html.join('');
List<string> listOfString = new List<string>();
for (int i = 0; i < 10; i++)
{
listOfString.Add(i.ToString());
}
string strResult = string.Join(", ", listOfString.ToArray());