SqlServer 查询sql执行时间
在查询分析器中输入以下内容:
set statistics profile on
set statistics io on
set statistics time on
go
go
set statistics profile off
set statistics io off
set statistics time off
相关文档:
DECLARE
TYPE list IS TABLE OF t_stu.project%TYPE INDEX BY BINARY_INTEGER;
project_list list;
v_pro_num NUMBER;
sql_str VARCHAR(255);
t_stu
SID SUBJECT SCORE
1 数学 &n ......
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc pGetInsertSQL (@TableName varchar(256))
as
begin
set nocount on
declare @sqlstr varchar(4000)
declare @sqlstr1 varchar(4000)
declare @sqlstr2 v ......
计算间隔时间:
select f_date,f_cstime,f_cetime, (((SYSDATE- TO_DATE(f_date||f_cstime,'YYYYMMDDHH24MISS')) * 86400000)-((SYSDATE- TO_DATE(f_date||f_cetime,'YYYYMMDDHH24MISS')) * 86400000))/1000 CURRENT_MILLI from ycsq_t_hauthlog where f_cstime<>'999999'
将字符串转换成日期类:SYSDATE- TO_ ......
--1.在目标服务器上建立如下对象(被同步的服务器)
if exists (select * from dbo.sysobjects where id = object_id(N'[sys_syscomments_bak]') and OBJECTPROPERTY(id, N'IsUserTable')   ......
是拷贝的别人的,以备学习
package com.unmi.db;
import java.io.FileInputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 读取 SQL 脚本并执行
* @author Unmi
*/
pub ......