查询存储过程的参数信息的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数据库备份和还原
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 ......
具体要注意的:
1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:
select id from t where num is null
可以在num上设置默认值0,确保表中num列没有null值,然后这样查询:
select id from t where num=0 &n ......
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
& ......
select语句前加:
declare @d datetime
set @d=getdate()
并在select语句后加:
select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())
转自:动态网制作指南 www.knowsky.com
这是简易的查看执行时间的方法。
===========================================(一下内容转自:CSDN)
MSSQL Server中通过查 ......