当前位置:网站首页>SQL Server Query spécifie la structure de la table
SQL Server Query spécifie la structure de la table
2022-07-03 02:33:00 【Lee Meier.】
SELECT
Nom du tableau = 'dbo.Treestructure',
Description du tableau = CASE WHEN A.COLORDER=1 THEN ISNULL(F.VALUE,'') ELSE '' END,
Numéro de champ = A.COLORDER,
Nom du champ = A.NAME,
Auto - identification = CASE WHEN COLUMNPROPERTY( A.ID,A.NAME,'ISIDENTITY')=1 THEN '√'ELSE '' END,
Clé primaire = CASE WHEN EXISTS(SELECT 1 FROM SYSOBJECTS WHERE XTYPE='PK' AND PARENT_OBJ=A.ID AND NAME IN (
SELECT NAME FROM SYSINDEXES WHERE INDID IN(
SELECT INDID FROM SYSINDEXKEYS WHERE ID = A.ID AND COLID=A.COLID))) THEN '√' ELSE '' END,
Type de données = B.NAME,
Octets occupés = A.LENGTH,
Longueur = COLUMNPROPERTY(A.ID,A.NAME,'PRECISION'),
Décimales = ISNULL(COLUMNPROPERTY(A.ID,A.NAME,'SCALE'),0),
Peut être vide = CASE WHEN A.ISNULLABLE=1 THEN '√'ELSE '' END,
Par défaut = ISNULL(E.TEXT,''),
Description du champ = ISNULL(G.[VALUE],'')
FROM
SYSCOLUMNS A
LEFT JOIN SYSTYPES B ON A.XUSERTYPE=B.XUSERTYPE
INNER JOIN SYSOBJECTS D ON A.ID=D.ID AND D.XTYPE='U' AND D.NAME<>'DTPROPERTIES'
LEFT JOIN SYSCOMMENTS E ON A.CDEFAULT=E.ID
LEFT JOIN sys.extended_properties G ON A.ID=G.major_id AND A.COLID=G.minor_id
LEFT JOIN sys.extended_properties F ON D.ID=F.major_id AND F.minor_id=0
where
D.name = 'Treestructure'
ORDER BY D.NAME,A.ID,A.COLORDER
边栏推荐
- Gbase 8C trigger (II)
- 【 tutoriel】 Chrome ferme les cors et les messages de la politique inter - domaines et apporte des cookies à travers les domaines
- random shuffle注意
- GBase 8c系统表-pg_class
- 【CodeForces】CF1338A - Powered Addition【二进制】
- Random shuffle note
- cvpr2022去雨去雾
- Create + register sub apps_ Define routes, global routes and sub routes
- GBase 8c系统表-pg_amop
- Gbase 8C function / stored procedure definition
猜你喜欢

where 1=1 是什么意思

Create + register sub apps_ Define routes, global routes and sub routes

SPI机制

搭建私有云盘 cloudreve

Memory pool (understand the process of new developing space from the perspective of kernel)

返回一个树形结构数据

Pytorch convolution network regularization dropblock

Principle and application of database

The Linux server needs to install the agent software EPS (agent) database

Random Shuffle attention
随机推荐
HW-初始准备
oauth2.0鉴权,登录访问 “/oauth/token”,请求头Authorization(basicToken)如何取值???
5.文件操作
GBase 8c 创建用户/角色 示例二
cvpr2022去雨去雾
5. File operation
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
Leetcode (540) -- a single element in an ordered array
Producer consumer model based on thread pool (including blocking queue)
where 1=1 是什么意思
The Linux server needs to install the agent software EPS (agent) database
【 tutoriel】 Chrome ferme les cors et les messages de la politique inter - domaines et apporte des cookies à travers les domaines
Gbase 8C system table PG_ attribute
Gbase 8C system table PG_ amop
Gbase 8C trigger (II)
Gbase 8C system table PG_ constraint
Exception handling in kotlin process
MUX VLAN Foundation
Choose it when you decide
Random Shuffle attention