当前位置:网站首页>SQL server queries the table structure of the specified table
SQL server queries the table structure of the specified table
2022-07-03 02:34:00 【Lee Meier】
SELECT
Table name = 'dbo.Treestructure',
Table description = CASE WHEN A.COLORDER=1 THEN ISNULL(F.VALUE,'') ELSE '' END,
Field ordinal number = A.COLORDER,
Field name = A.NAME,
Self increasing label = CASE WHEN COLUMNPROPERTY( A.ID,A.NAME,'ISIDENTITY')=1 THEN '√'ELSE '' END,
Primary key = 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,
data type = B.NAME,
Bytes occupied = A.LENGTH,
length = COLUMNPROPERTY(A.ID,A.NAME,'PRECISION'),
Decimal digit = ISNULL(COLUMNPROPERTY(A.ID,A.NAME,'SCALE'),0),
Could you empty = CASE WHEN A.ISNULLABLE=1 THEN '√'ELSE '' END,
The default value is = ISNULL(E.TEXT,''),
Field description = 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
边栏推荐
- Awk from entry to burial (1) awk first meeting
- easyPOI
- Thread safe singleton mode
- Matlab tips (24) RBF, GRNN, PNN neural network
- Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
- Principle and application of database
- SPI mechanism
- 定了,就选它
- QT qcombobox add qccheckbox (drop-down list box insert check box, including source code + comments)
- Gbase 8C trigger (II)
猜你喜欢

通达OA 首页门户工作台

What does "where 1=1" mean
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)

【翻译】具有集中控制平面的现代应用负载平衡

Oauth2.0 authentication, login and access "/oauth/token", how to get the value of request header authorization (basictoken)???
![[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)](/img/6e/67bc187a89fb9125856c78c89f7bfb.gif)
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)

HW-初始准备

easyExcel

Producer consumer model based on thread pool (including blocking queue)
随机推荐
【 tutoriel】 Chrome ferme les cors et les messages de la politique inter - domaines et apporte des cookies à travers les domaines
Tongda OA V12 process center
Machine learning process and method
HW-初始准备
通达OA v12流程中心
Gbase 8C system table PG_ amproc
基于线程池的生产者消费者模型(含阻塞队列)
awk从入门到入土(3)awk内置函数printf和print实现格式化打印
Apple releases MacOS 11.6.4 update: mainly security fixes
Choose it when you decide
GBase 8c触发器(二)
Gbase 8C system table PG_ collation
Gbase 8C system table PG_ class
xiaodi-笔记
What does "where 1=1" mean
Servlet中数据传到JSP页面使用el表达式${}无法显示问题
Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
Linear rectification function relu and its variants in deep learning activation function
The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}
cvpr2022去雨去雾