当前位置:网站首页>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
边栏推荐
猜你喜欢

通达OA v12流程中心
![[Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数](/img/06/ab333a4752de27eae2dd937cf579e2.png)
[Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数

【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

4. 类和对象

面试项目技术栈总结

How to change the panet layer in yolov5 to bifpn

基于can总线的A2L文件解析(2)

Tongda OA V12 process center

oauth2.0鉴权,登录访问 “/oauth/token”,请求头Authorization(basicToken)如何取值???
随机推荐
cvpr2022去雨去雾
UDP receive queue and multiple initialization test
awk从入门到入土(0)awk概述
GBase 8c系统表-pg_class
Awk from getting started to being buried (2) understand the built-in variables and the use of variables in awk
Compréhension simple de SVG
MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
easyExcel
Current situation and future of Web3 in various countries
Gbase 8C system table PG_ class
QT qcombobox add qccheckbox (drop-down list box insert check box, including source code + comments)
Awk from entry to burial (1) awk first meeting
通达OA v12流程中心
Word word word
Build a private cloud disk cloudrev
COM和CN
4. 类和对象
GBase 8c系统表-pg_constraint
Startup mode and scope builder of collaboration in kotlin
Choose it when you decide