Generate Data Dictionary from SQL Server
2016-02-18 15:58
465 查看
目录
目录Introduction
Using the code
License
原文链接:http://www.codeproject.com/Tips/501909/Generate-Data-Dictionary-from-SQL-Server
Johirul Islam Tarun, 27 Feb 2013
ps: 用sql代码生成数据字典
Introduction
This tip shows how to find out table description and dependency with other tables.Using the code
In any SQL Server database (any version of SQL Server) just create a Stored Procedure [spGenerateDBDictionary] that is given as attachment, and exec [spGenerateDBDictionary]. Then the procedure will return tables information with table name, data, attributes, data types, IsNullable info, primary key, foreign key constraints, any reference with another table, and the details description, but remember that the description will come from the description field where you give any description at the time of table creation.[code]USE [Database_Name] -- ============================================= -- Author:JOHIR -- Create date: 01/12/2012 -- Description: GENERATE DATA DICTIONARY FROM SQL SERVER -- ============================================= CREATE proc [dbo].[spGenerateDBDictionary] AS BEGIN select a.name