时间:2021-05-23
复制代码 代码如下:
CREATE VIEW dbo.vw_db_dictionary
AS
SELECT TOP 100 PERCENT dbo.sysobjects.name AS table_name,
dbo.sysproperties.[value] AS table_desc, dbo.syscolumns.name AS field,
properties.[value] AS field_desc, dbo.systypes.name AS field_type,
dbo.syscolumns.length AS field_size,
ISNULL(COLUMNPROPERTY(dbo.syscolumns.id, dbo.syscolumns.name, 'Scale'), 0)
AS field_precision, dbo.syscolumns.isnullable AS nullable,
CASE WHEN syscomments.text IS NULL
THEN '' ELSE syscomments.text END AS default_value,
CASE WHEN COLUMNPROPERTY(syscolumns.id, syscolumns.name, 'IsIdentity')
= 1 THEN '√' ELSE '' END AS is_identity, CASE WHEN EXISTS
(SELECT 1
FROM sysobjects
WHERE xtype = 'PK' AND name IN
(SELECT name
FROM sysindexes
WHERE indid IN
(SELECT indid
FROM sysindexkeys
WHERE id = syscolumns.id AND colid = syscolumns.colid)))
THEN '√' ELSE '' END AS is_key
FROM dbo.syscolumns INNER JOIN
dbo.sysobjects ON dbo.sysobjects.id = dbo.syscolumns.id INNER JOIN
dbo.systypes ON dbo.syscolumns.xtype = dbo.systypes.xtype LEFT OUTER JOIN
dbo.sysproperties properties ON dbo.syscolumns.id = properties.id AND
dbo.syscolumns.colid = properties.smallid LEFT OUTER JOIN
dbo.sysproperties ON dbo.sysobjects.id = dbo.sysproperties.id AND
dbo.sysproperties.smallid = 0 LEFT OUTER JOIN
dbo.syscomments ON dbo.syscolumns.cdefault = dbo.syscomments.id
WHERE (dbo.sysobjects.xtype = 'U')
ORDER BY dbo.sysobjects.name
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
01原子DDL介绍原子DDL语句将数据字典更新、存储引擎操作和与DDL操作相关联的二进制日志写入合并到单个原子操作中。该操作要么提交,对数据字典、存储引擎和二进
//获取地址栏的参数数组functiongetUrlParams(){varsearch=window.location.search;//写入数据字典vart
本文实例讲述了T-sql语句修改SQLServer数据库逻辑名、数据库名、物理名的方法。分享给大家供大家参考,具体如下:更改MSSQL数据库物理文件名Sql语句
MySQL8.0开始支持原子数据定义语言(DDL)语句。此功能称为原子DDL。原子DDL语句将与DDL操作关联的数据字典更新,存储引擎操作和二进制日志写入组合到
数据字典是数据库中描述信息和控制信息的集合,他是数据库设计和管理的有力工具。数据字典包含(数据项、数据流、数据结构、数据存储、处理过程)五个部分。同时也是详细数