用來顯示2個資料庫中具有不同表名的表的資訊以及具有相同表的表結構不同的資訊。 /*Test1Test3DataBase2 Test3*/with A as(select name,type from Test1.sys.objects where type in ('U','V')),B as(select name,type from Test3.sys.objects where type in ('U','V'))select case when A.type is null then
create table #temp (dbname nvarchar(50))declare @xname nvarchar(50)declare @rowCount intdeclare mycur cursor for select name from sys.databases where owner_sid <> 0x01open mycurfetch next from mycur into @xnamewhile @@FETCH_STATUS = 0begin
--create database myTestUSE myTest--CREATE TABLEIF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'Country') AND type = N'U')CREATE TABLE Country(CountryID INT IDENTITY(1,1) PRIMARY KEY,CountryName NVARCHAR(255) NOT NULL)IF NOT
var temper="2009-6-28 15:23" var dt = new Date(temper.replace(/-/,"/")) alert(dt) 或者 : function ConvertDateFromString(dateString) { if (dateString) { var arr1 = dateString.split(" "); var sdate = arr1[0].split('
--建立測試表 [CREATE] TABLE t1(ID int IDENTITY,A int) GO --插入記錄 INSERT t1 VALUES(1) GO --1. 將IDENTITY(標識)列變為普通列 [ALTER] TABLE t1 ADD ID_temp int GO UPDATE t1 SET ID_temp=ID [ALTER] TABLE t1 DROP COLUMN ID EXEC
Math.round(Math.random() * 10000)父視窗彈出子視窗,子視窗選擇值後,賦值到父視窗的某個控制項上 父視窗代碼: function fn_GetMarksClassModel() { var url = "SelectMarksClassModel.aspx?temp=" + Math.round(Math.random() * 10000); var val = window.showModalDialog(url, '',