惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
P
Proofpoint News Feed
P
Privacy International News Feed
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
S
Securelist
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
GbyAI
GbyAI
B
Blog RSS Feed
A
About on SuperTechFans
C
CXSECURITY Database RSS Feed - CXSecurity.com
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cyberwarzone
Cyberwarzone
I
Intezer
T
Tor Project blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
aimingoo的专栏
aimingoo的专栏
Cisco Talos Blog
Cisco Talos Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
D
DataBreaches.Net
U
Unit 42
Project Zero
Project Zero
Martin Fowler
Martin Fowler
V
V2EX
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V2EX - 技术
V2EX - 技术
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threat Research - Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tenable Blog
F
Full Disclosure
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
Latest news
Latest news
Webroot Blog
Webroot Blog

博客园 - 荣-

学习实践:使用模式,原则实现一个C++自动化测试程序 学习实践:使用模式,原则实现一个C++数据库访问类 C++字符转换等常用方法 DLL内存管理模板类 字符串处理代码(国际化转换C++版) 我的C++数据库访问库--临界区处理类 我的C++数据库访问库 批处理文件的学习 C++中,以类成员函数指针作为参数对std::map中的元素进行迭代处理 我的我的C#数据库操作类(与大家交流) ACE项目的重构整理 安装SQL Server 2000和sp补丁时,安装程序提示"以前的某个程序安装已在安装计算机上创建挂起的文件操作。运行安装程序之前必须重新启动计算机"。 我的计算机安装步骤 创建oracle用户 我的重构步骤 我的C++代码检查列表 PowerDesigner高级应用 文档的阅读 如何设计类
取得MySQL数据库表,列信息的SQL语句
荣- · 2010-03-17 · via 博客园 - 荣-

/*取得表信息*/
select table_Comment as Script, table_Name as TableName, 0 as id, Create_Time as createDate,
CASE table_Type WHEN 'BASE TABLE' then 'U' when 'VIEW' then 'V' ELSE table_Type END as tableType,
0 as Category from tables;

/*取得外键关系*/
SELECT CONSTRAINT_Name as Script, CONSTRAINT_Name as TableName, 0 as id,
 CURRENT_TIMESTAMP  as createDate, 
       CASE CONSTRAINT_TYPE
      WHEN 'FOREIGN KEY' THEN 'F'
      WHEN 'PRIMARY KEY' THEN 'K'   
            ELSE CONSTRAINT_TYPE
     END AS tableType,  0 as Category  From TABLE_CONSTRAINTS;       

SELECT Table_Name, Column_Name, Column_Type, Column_Key, Column_Comment From Columns ;

/*取得列信息*/
select table_name as tablename, column_Name as columnName, column_type as columnType,
0 as columntypeindex, CHARACTER_OCTET_LENGTH as length, Numeric_Precision as decimaldigits, 
column_comment as Script,column_default as defaultvalue, is_nullable as isnullable,
case extra when  'auto_increment' then 1 else 0 end as IsMarking,
0 as colid, 'U' as ObjectType, data_type from columns;