当前位置:网站首页>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
边栏推荐
- Matlab tips (24) RBF, GRNN, PNN neural network
- [codeforces] cf1338a - Powered addition [binary]
- Gbase 8C function / stored procedure parameters (II)
- GBase 8c 函数/存储过程参数(二)
- QT qcombobox add qccheckbox (drop-down list box insert check box, including source code + comments)
- HTB-Devel
- xiaodi-笔记
- 【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)
- Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
- 8 free, HD, copyright free video material download websites are recommended
猜你喜欢
[fluent] listview list (map method description of list set | vertical list | horizontal list | code example)
What does "where 1=1" mean
Restcloud ETL cross database data aggregation operation
The use of Flink CDC mongodb and the implementation of Flink SQL parsing complex nested JSON data in monggo
easyPOI
Create + register sub apps_ Define routes, global routes and sub routes
Job object of collaboration in kotlin
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
[Hcia]No.15 Vlan间通信
Mathematical statistics -- Sampling and sampling distribution
随机推荐
Gbase 8C function / stored procedure definition
HW-初始准备
Coroutinecontext in kotlin
Gbase 8C function / stored procedure parameters (II)
【CodeForces】CF1338A - Powered Addition【二进制】
Detailed introduction to the usage of Nacos configuration center
COM和CN
Memory pool (understand the process of new developing space from the perspective of kernel)
GBase 8c系统表-pg_conversion
通达OA v12流程中心
【翻译】Flux安全。通过模糊处理获得更多信心
[tutorial] chrome turns off cross domain policies CORS and samesite, and brings cookies across domains
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
返回一个树形结构数据
GBase 8c 创建用户/角色 示例二
Interview stereotyped version
Basic operation of binary tree (C language version)
random shuffle注意
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)
Thread safe singleton mode