是有這個問題的。第一,應當用正則判斷較好。第二,我用迴圈加返回結果大於30個長度就退出迴圈,我相信沒有表名和欄位名大於30個字母的,但是欄位值有可能大於,這個地方解決的不夠好。但是一般是用來查背景管理員的使用者名稱和密碼,所以就放棄了。 複製代碼 代碼如下:set arg=wscript.arguments If (LCase(Right(Wscript.fullname,11))="Wscript.Exe") Then Wscript.Quit End If if arg.count=0
複製代碼 代碼如下:--create database dbTemp use dbTemp create table test ( Pid int identity(1,1) not null primary key, Years datetime, IsFirstSixMonths int default(0), --0表示上半年1表示下半年-- TotalCome int ) insert test select '2007-1-1',0,50 union select '2007-3-1'
GetOwner.VBS用法,在命令列下:GetOwner.vbs 目錄名會在相應目錄下產生一個TXT.TXT檔案,內裡列出該目錄下所有檔案和檔案夾的類型,大小,和所有者 注意:大小以MB為單位,小於1MB的就顯示為0MB, 以下是代碼: G = WScript.arguments(0) Set oFSO = CreateObject("Scripting.FileSystemObject") set txt = oFSO.CreateTextFile(G&"TXT.txt",true)
declare @LikeSql nvarchar(32);--定義一個like變數,如果是預存程序,此處可以預存程序的參數 set @LikeSql = ‘someword%';--把LikeSql變數賦值,可以賦值成'%xxxxxxxxxxxx%' declare @SelectSql nvarchar(128)--定義Sql語句,開始拼Sql set @SelectSql = ‘select * from Table where [Column] like
1. DECLARE TYPE ref_cursor_type IS ref CURSOR; v_mycursor ref_cursor_type; TYPE id_list IS TABLE OF integer; TYPE name_list IS TABLE OF varchar2(30); v_tabid id_list:=id_list(); v_tabname name_list:=name_list(); sql_str varchar2(200); BEGIN
複製代碼 代碼如下:''owc.vbs class owc private o '傳入物件 public property set set_obj(o_id) set o=o_id end property '畫圖矩形圖 'chart_bgcolor_圖表的背景顏色 'chartCaption_圖表的標題 'chartCaption_fontColor_圖表標題顏色 'Interior_Color_矩形內的填充顏色 'Caption_名稱 'categories_名稱數組
1.調整記憶體 sp_configure 'show advanced options',1 GO RECONFIGURE Go sp_configure 'awe enabled', 1 GO RECONFIGURE Go sp_configure 'min server memory',1024 Go sp_configure 'max server memory',3072 GO RECONFIGURE Go PS: OS需要開啟AWE 即在boot.ini裡 添加 /3G 或者
id name 1 a 2 b 3 c 1 a 2 b 3 c 以下的sql語句都以上面表mytable為準: 1、查詢id=1,3記錄的所有資料 複製代碼 代碼如下:select * from mytable where id in(1,3) 2、刪除id重複的資料,表中資料只剩下id=1,2,3的所有資料 複製代碼 代碼如下:select * into # from mytable truncate table mytable insert table select distinct *