Home  >  Article  >  Database  >  查看数据库对象创建脚本

查看数据库对象创建脚本

WBOY
WBOYOriginal
2016-06-07 17:44:401386browse

我们在做维护项目时经常需要查看数据库结构,但是用SQL Server Management Studio来查看数据库对象的创建脚很不方便,尤其是触发器、索引、约束的创建都与表有关,它们的脚本有关联。 首先我们来看看触发器、函数、存储过程他们的创建都是带有明显的脚本信息

我们在做维护项目时经常需要查看数据库结构,但是用SQL Server Management Studio来查看数据库对象的创建脚很不方便,尤其是触发器、索引、约束的创建都与表有关,香港服务器租用,香港服务器租用,它们的脚本有关联。

首先我们来看看触发器、函数、存储过程他们的创建都是带有明显的脚本信息,香港服务器租用,这些脚本信息主要存放在sys.sql_modules,

sql代码如下:

View Code

(,o.type,m.definition o.object_id

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn