专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
网上有很多SQL Server数据库字典的SQL语句,七零八落,我在工作整理了一下思路,总结SQL代码如下。数据库字典包括表结构(分2K和2005)、索引和主键.外键.约束.视图.函数.存储过程.触发器。可以在企业管理器、查询分析器中简单执行,直接了当的查出SQL2K及SQL2005的所有数据字典,方便文档的编写,希望对大家有帮助。   1. SqlServer2000数据库字典--表结构.sql SELECT TOP 100 PERCENT --a.id, CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS 表名, ... [阅读全文] [PDF]
IF OBJECT_ID(N'dbo.p_ExportHtml') IS NOT NULL DROP PROC dbo.p_ExportHtml; GO /*-- == 导出表/视图中的数据为html 文件====================== 此存储过程用于将指定的表/视图中的数据导出为 html 文件 由于是使用存储过程, 因此文件目录基于 sql server 服务器 存储过程中会使用xp_cmdshell 调用bcp 来写文件 因此必须打开xp_cmdshell 功能, 可以使用下面的脚本实现 EXEC sp_configure N'show ad... [阅读全文] [PDF]
Creating and working with Views in a Database Introduction Views are generally used to focus, simplify, and customize each user's perception of the database. You can use a view as a security mechanism by allowing a user to access data through the view without granting the user permission to direct... [阅读全文] [PDF]
1 共3条 分1页