Time of Update: 2018-12-04
--SQL刪除資料庫中所有使用者資料表外鍵--查詢刪除前的當前資料庫所有約束select * from information_schema.key_column_usagedeclare @TableName nvarchar(250)--聲明讀取資料庫所有資料表名稱遊標mycursor1declare mycursor1 cursor for select name from dbo.SysObjects WHERE OBJECTPROPERTY(ID, 'IsUserTable') = 1
Time of Update: 2018-12-04
--SQL備份所有資料庫指令碼declare @CurrentDataBaseName nvarchar(100)declare @CurrentBackFolder nvarchar(200)declare @CurrentBackString nvarchar(2000)set @CurrentBackFolder='D:\Test'--這裡是備份的目錄,所有資料庫都備份到這個目錄--查詢所有資料庫名稱--select * from master..sysdatabases
Time of Update: 2018-12-04
--SQL刪除資料庫中所有使用者資料表主鍵--查詢刪除前的當前資料庫所有約束select * from information_schema.key_column_usagedeclare @TableName nvarchar(250)--聲明讀取資料庫所有資料表名稱遊標mycursor1declare mycursor1 cursor for select name from dbo.SysObjects WHERE OBJECTPROPERTY(ID, 'IsUserTable') = 1
Time of Update: 2018-12-04
--SQL建立資料庫中所有使用者資料表自增一主鍵--主鍵說明:名稱為ID,資料類型為整形自增一--查詢建立前的當前資料庫所有約束select * from information_schema.key_column_usagedeclare @TableName nvarchar(250)declare @ColumnName nvarchar(250)set @ColumnName='ID'--聲明讀取資料庫所有資料表名稱遊標mycursor1declare mycursor1 cursor
Time of Update: 2018-12-04
--SQL批次更新資料庫中所有使用者資料表中欄位類型為tinyint為int--關鍵說明:--1、從系統資料表syscolumns中的查詢所有xtype='48'的記錄得到類型為[tinyint]的欄位--2、更新欄位類型前如果該欄位有預設值索引則應先刪除掉對應的索引--3、資料表欄位資料類型為tinyint在CodeSmith中讀出來的是DbType.Byte類型,需要修正declare @TableName
Time of Update: 2018-12-04
--SQL過濾掉空格和其他特殊字元函數crteate function dbo.GetCodeString(@SourceSql varchar(500))returns nvarchar(500)as begindeclare @i intdeclare @ValidChar nvarchar(100)declare @temp nvarchar(500)set
Time of Update: 2018-12-04
FORM表單裡的下拉選項框<select name="RsType<%=i%>" size="1" id="RsType<%=i%>"> <option value="AutoIncrement" <% if i=0 then response.Write("selected")%>>自動編號</option> <option value="varchar" <% if i&
Time of Update: 2018-12-04
<%Dim a(10,10)dim digital,num2,i,hc,Ja(0,1) = "0x3c" '數字0a(0,2) = "0x66"a(0,3) = "0xc3"a(0,4) = "0xc3"a(0,5) = "0xc3"a(0,6) = "0xc3"a(0,7) = "0xc3"a(0,8) = "0xc3"a(0,9) = "0x66"a(0,10)= "0x3c"a(1,1) = "0x18" '數字1a(1,2) = "0x1c"a(1,3) = "0x18"a(
Time of Update: 2018-12-04
--SQL清除所有資料庫日誌指令碼declare @CurrentDataBaseName nvarchar(100)declare @CurrentDataBaseID nvarchar(100)declare @CurrentLogName nvarchar(100)declare @CurrentClearString nvarchar(4000)declare @CurrentLogFileName nvarchar(255)declare @CurrentClearLogString
Time of Update: 2018-12-04
來南京的第一天,參加了百度和4399的筆試,做的不好,估計都沒戲了。查了一下第二天的宣講會,宣講會倒不少,只是沒有幾個專業對口的,後來發現了一家小公司的宣講通知,簡單的要求本科學曆,然後下面這幾點很迷人的: 1、喜歡並對軟體行業及對應崗位有濃厚的興趣。 2、數學、物理等理科成績優異,極度聰明。 3、薪水足夠高。 同學下午要去參加恒大的宣講會,順路跟他一塊過去了,才發現人山人海的,裡面根本進不去,外面整個大廳還站滿了人
Time of Update: 2018-12-04
主要使用Binn/isql.exe執行SQL指令檔命令進行操作,SQL指令檔在安裝程式中自動產生,完成操作後刪除。詳細代碼如下: Section !主程式 sec01;使用者必選的安裝程式SectionIn RO ;判斷資料庫是否已經附加,如果沒有附加,則附加資料庫ClearErrors;從註冊表中讀取SQL安裝程式路徑ReadRegStr $R1 HKLM "SOFTWARE/Microsoft/Microsoft SQL Server/80/Tools/ClientSetup"
Time of Update: 2018-12-04
CodeSmith產生資料庫檢視實體類 開啟開始--所有程式---CodeSmith Professional 5.0.1.4983--CodeSmith Explorer建立立到所要操作資料庫的串連名稱自訂為DB開啟開始--所有程式---CodeSmith Professional 5.0.1.4983--CodeSmith
Time of Update: 2018-12-04
Sub CopyTable(PathName,TableName,TableName1)response.Write("<br>資料庫路徑:"&PathName)response.Write("<br>來源資料表名稱:"&TableName)response.Write("<br>目標資料表名稱:"&TableName1)strConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Time of Update: 2018-12-04
<%Call Com_CreatValidCode("ValidCode")Sub Com_CreatValidCode(CheckCode) ' 禁止緩衝 Response.Expires = -9999 Response.AddHeader "Pragma","no-cache" Response.AddHeader "cache-ctrol","no-cache" Response.ContentType = "Image/BMP"
Time of Update: 2018-12-04
Time of Update: 2018-12-04
--SQL大量刪除資料表中指定欄位對應的所有約束--定義要操作的資料表名變數declare @TableName nvarchar(250)set @TableName='資料表名'--定義要操作的欄位名變數declare @ColumnName nvarchar(250)set @ColumnName='欄位名'--定義當前查詢的約束變數declare @ConstraintName varchar (250)--聲明讀取資料表中指定欄位對應的所有約束列表遊標declare
Time of Update: 2018-12-04
由於工作需要,遇到一個資料庫API封裝調用的問題,其中涉及到了函數調用方式,參考網上搜集的資源,整理學習了一下。函數的調用方式主要有以下幾種:1、__cdecl__cdecl 是C
Time of Update: 2018-12-04
--SQL大量新增主鍵指令碼--操作提示:運行此指令碼前請記得備份您要操作的資料庫--實現功能:執行指令碼後資料庫中的所有資料表都會有一個主鍵--添加規則1:主鍵名稱為ID(可自己修改),資料類型為整形自增一--添加規則2:如果資料表已有主鍵,則不添加--添加規則3:如果資料表沒主鍵但已存在自增一的識別欄位,則設定該識別欄位為主鍵--添加規則4:如果資料表沒主鍵且已存在ID列,則會刪除掉該列,記得要檢查該ID列是否包含重要資料,如果有的話,請執行指令碼前改名。--指令碼代碼開始declare @
Time of Update: 2018-12-04
用VS2008編譯C++源檔案時總是出現如下警告 Warning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data
Time of Update: 2018-12-04
--SQL讀取指定資料表中的所有欄位說明declare @TableName nvarchar(250)--當前操作的資料表名set @TableName='hzfa'--指定要查詢的資料表名稱(請修改成你自己資料庫中的表名)declare @ColumnName nvarchar(250)--遊標中的當前查詢的欄位名稱declare @ColumnDescription nvarchar (250)--遊標中的當前查詢的欄位說明--聲明讀取資料表中所有欄位說明的遊標declare