易截截图软件、单文件、免安装、纯绿色、仅160KB

查询存储过程的参数信息的SQL语句

declare @SchemaName nvarchar(50)
set @SchemaName='dbo'
declare @CommandName nvarchar(50)
set @CommandName='spName'
SELECT
                DB_NAME() AS [PROCEDURE_CATALOG],
                @SchemaName AS [PROCEDURE_SCHEMA],
                NULL AS [PROCEDURE_NAME],
                '@RETURN_VALUE' AS [PARAMETER_NAME],
                0 AS [ORDINAL_POSITION],
                CAST(4 AS smallint) AS [PARAMETER_TYPE],
                0 AS [PARAMETER_HASDEFAULT],
                NULL AS [PARAMETER_DEFAULT],
                CAST(0 AS bit) AS [IS_NULLABLE],
                0 AS [DATA_TYPE],
                NULL AS [CHARACTER_MAXIMUM_LENGTH],
                NULL AS [CHARACTER_OCTET_LENGTH],
                CAST(10 AS smallint) AS [NUMERIC_PRECISION],
                CAST(NULL AS smallint) AS [NUMERIC_SCALE],
                NULL AS [DESCRIPTION],
 


相关文档:

asp.net(C#)实现SQL2000数据库备份和还原

asp.net(C#)实现SQL2000数据库备份和还原
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......

sql大数据操作如何优化

具体要注意的:  
1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:  
select id from t where num is null  
可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:  
select id from t where num=0 &n ......

SQL 常用语句

Student(S#,Sname,Sage,Ssex) 学生表
Course(C#,Cname,T#) 课程表
SC(S#,C#,score) 成绩表
Teacher(T#,Tname) 教师表
 
问题:
1、查询“001”课程比“002”课程成绩高的所有学生的学号;
  select a.S# from (select s#,score from SC where C#='001') a,(select s#,score
& ......

测试MSSQL中SQL语句执行花费的时间

select语句前加:
declare @d datetime
set @d=getdate()
并在select语句后加:
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())
转自:动态网制作指南 www.knowsky.com
这是简易的查看执行时间的方法。
===========================================(一下内容转自:CSDN)
MSSQL Server中通过查 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号