Sql Server 使用系统存储过程 及 自定义存储过程 “usp_Helloworld”
来源:互联网 发布:电信4g网络好用吗 编辑:程序博客网 时间:2024/06/09 14:02
Sql Server系统存储过程
--是放在系统数据库 master 中的--可编程性---存储过错--系统存储过程中
exec sp_databases
----sp_databases的 内部 代码select
DATABASE_NAME = db_name(s_mf.database_id),
DATABASE_SIZE = convert(int,
case -- more than 2TB(maxint) worth of pages (by 8K each) can not fit an int...
when convert(bigint, sum(s_mf.size)) >= 268435456
then null
else sum(s_mf.size)*8 -- Convert from 8192 byte pages to Kb
end),
REMARKS = convert(varchar(254),null)
from
sys.master_files s_mf
where
s_mf.state = 0 and -- ONLINE
has_dbaccess(db_name(s_mf.database_id)) = 1 -- Only look at databases to which we have access
group by s_mf.database_id
order by 1
---使用 sp_helptext 来显示一个 存储过程 中的 代码 。
exec sp_helptext sp_databases
exec sp_helptext sp_helptext
--给数据库重命名:
exec sp_renamedb 'Test','Test123'
exec sp_tables
exec sp_columns 'Student'
自定义存储过程 “usp_Helloworld”并使用。实现输出hello world!
create proc usp_Helloworld
as
begin
print 'hello world!'
end
exec usp_Helloworld
- Sql Server 使用系统存储过程 及 自定义存储过程 “usp_Helloworld”
- 使用系统存储过程 及 自定义存储过程 “usp_Helloworld”
- SQL server常用命令及系统存储过程
- SQL Server 系统存储过程
- SQL Server系统存储过程
- SQL Server系统存储过程
- Sql Server使用存储过程
- sql server使用存储过程
- sql server系统存储过程及安全配置
- Sql Server 系统存储过程分析 1 - 目录存储过程
- SQL SERVER 存储过程和自定义函数
- SQL SERVER存储过程
- SQL SERVER存储过程
- Sql Server 存储过程
- SQL Server存储过程
- SQL SERVER 存储过程
- SQL Server 存储过程
- SQL Server存储过程
- smarty
- hoare管程实现电梯调度
- c#分页
- 元对象编译器moc
- 十天内掌握线性代数:惊人的超速学习实验
- Sql Server 使用系统存储过程 及 自定义存储过程 “usp_Helloworld”
- 第一时间揭秘:帮奥巴马获胜的数据处理团队
- SSH服务器配置文件详解
- 解决css浏览器兼容问题的几种策略
- oracle实现/排名/求百分比
- poj 2349 (最小生成树 Prim)
- sql中视图
- $smarty.now
- Linux内核代码风格 CodingStyle