主頁 > 知識(shí)庫 > 獲取MSSQL數(shù)據(jù)字典的SQL語句

獲取MSSQL數(shù)據(jù)字典的SQL語句

熱門標(biāo)簽:電銷機(jī)器人公司 需要哪些牌照 廣東防封卡外呼系統(tǒng)原理是什么 菏澤語音電銷機(jī)器人加盟公司 外呼系統(tǒng)改進(jìn) 長沙智能外呼系統(tǒng) 分享百度地圖標(biāo)注多個(gè)位置 地圖標(biāo)注牌 湖南電腦外呼系統(tǒng)平臺(tái) 知名電銷機(jī)器人價(jià)格
復(fù)制代碼 代碼如下:

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
您可能感興趣的文章:
  • 講解Oracle數(shù)據(jù)庫中的數(shù)據(jù)字典及相關(guān)SQL查詢用法
  • js實(shí)現(xiàn)的類似于asp數(shù)據(jù)字典的數(shù)據(jù)類型代碼實(shí)例
  • mssql2005,2008導(dǎo)出數(shù)據(jù)字典實(shí)現(xiàn)方法
  • Oracle的數(shù)據(jù)字典技術(shù)簡析
  • windows下apache+php+mysql 環(huán)境配置方法
  • linux下安裝apache與php;Apache+PHP+MySQL配置攻略
  • PHP讀取MySQL數(shù)據(jù)代碼
  • CentOS 6.4安裝配置LAMP服務(wù)器(Apache+PHP5+MySQL)
  • CentOS+Nginx+PHP+MySQL詳細(xì)配置(圖解)
  • php生成mysql的數(shù)據(jù)字典

標(biāo)簽:福建 呼和浩特 天水 泉州 西寧 珠海 美容院 商洛

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《獲取MSSQL數(shù)據(jù)字典的SQL語句》,本文關(guān)鍵詞  獲取,MSSQL,數(shù)據(jù),字典,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《獲取MSSQL數(shù)據(jù)字典的SQL語句》相關(guān)的同類信息!
  • 本頁收集關(guān)于獲取MSSQL數(shù)據(jù)字典的SQL語句的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章