当前位置:网站首页>All table queries and comment description queries of SQL Server
All table queries and comment description queries of SQL Server
2022-04-23 19:08:00 【Little brother】
Study SQL Server when , Yes 2 Special query statement , I'd like to record it , One is to query all database tables in the database , The second is to query the description field in the database table
1、 Query all the database tables in the database
select * from sysobjects where xtype = 'u' and name != 'sysdiagrams'
2、 Query the description field in the database table
SELECT A.name AS table_name,B.name AS column_name,C.value AS column_description
FROM sys.tables A INNER JOIN sys.columns B
ON B.object_id = A.object_id LEFT JOIN sys.extended_properties C
ON C.major_id = B.object_id AND C.minor_id = B.column_id
WHERE A.name =' Fill in the table name of the table to be queried
版权声明
本文为[Little brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210601423207.html
边栏推荐
猜你喜欢
[record] typeerror: this getOptions is not a function
Class loading process of JVM
mysql_linux版本的下載及安裝詳解
mysql通过binlog恢复或回滚数据
浅谈c语言指针的强制转换
Wechat applet part of the mobile phone Preview PDF did not respond
2022.04.23(LC_714_买卖股票的最佳时机含手续费)
2022.04.23 (the best time for lc_714_to buy and sell stocks, including handling charges)
开关电源设计分享及电源设计技巧图解
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
随机推荐
Practice of Druid SQL and security in meituan review
Esp32 (UART ecoh) - serial port echo worm learning (2)
为何PostgreSQL即将超越SQL Server?
Redis common interview questions
Introduction to ROS learning notes (II)
SSDB foundation 2
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
程序员如何快速开发高质量的代码?
Fundamentals of machine learning theory -- some terms about machine learning
std::stoi stol stoul stoll stof stod
Switching power supply design sharing and power supply design skills diagram
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
SSDB基础1
SQL Server database in clause and exists clause conversion
Advanced transfer learning
Esp32 (UART event) - serial port event learning (1)
開關電源設計分享及電源設計技巧圖解
Esp01s with Arduino development environment
Client interns of a large factory share their experience face to face
Eight bit binary multiplier VHDL