当前位置: 首页 > news >正文

自己的网站怎么做app搜索引擎有哪些网站

自己的网站怎么做app,搜索引擎有哪些网站,asp.net企业网站模板,程序员如何自学MySQL查询数据库中所有表名表结构及注释 生成数据库文档在后面!!! select t.TABLE_COMMENT -- 数据表注释 , c.TABLE_NAME -- 表名称 , c.COLUMN_COMMENT -- 数据项 , c.COLUMN_NAME -- 英文名称 , -- 字段描述 , upper(c.DATA_TYPE) as …

MySQL查询数据库中所有表名表结构及注释

生成数据库文档在后面!!! 

select t.TABLE_COMMENT -- 数据表注释
, c.TABLE_NAME -- 表名称
, c.COLUMN_COMMENT -- 数据项
, c.COLUMN_NAME -- 英文名称
, '' -- 字段描述
, upper(c.DATA_TYPE) as DATA_TYPE -- 数据类型
, c.CHARACTER_MAXIMUM_LENGTH -- 数据长度
, '' -- 是否字典项
, '' -- 字典内容
, (case
when c.IS_NULLABLE = 'YES' then '是'
when c.IS_NULLABLE = 'NO' then '否'
else c.IS_NULLABLE
end) as IS_NULLABLE -- 是否为空
, (
case
when c.COLUMN_KEY = 'PRI' then '是'
when c.COLUMN_KEY is null or c.COLUMN_KEY = '' then '是'
else c.COLUMN_KEY
end
) as COLUMN_KEY-- 是否主键
, c.COLUMN_DEFAULT-- 默认值
from information_schema.COLUMNS c,
information_schema.TABLES t
where c.TABLE_NAME = t.TABLE_NAME
and c.TABLE_SCHEMA not in ('information_schema', 'sys', 'performance_schema', 'mysql')
order by t.TABLE_COMMENT
;

information_schema.COLUMNSinformation_schema.TABLES这两个系统视图中检索数据表及其列的详细信息。

  1. 笛卡尔积:您的查询使用了逗号分隔的表名(information_schema.COLUMNS c, information_schema.TABLES t),这会导致两个表之间的笛卡尔积,除非您通过WHERE子句或其他方式明确指定连接条件。在您的例子中,您确实在WHERE子句中指定了c.TABLE_NAME = t.TABLE_NAME作为连接条件,但这仍然可能导致性能问题,因为不是标准的JOIN语法。
  2. JOIN语法:建议使用显式的JOIN语法来连接表,因为它更清晰且更容易维护。
  3. 表注释t.TABLE_COMMENT可能是从TABLES视图中获取的,但是您没有确保TABLES视图中的TABLE_COMMENT是针对与COLUMNS中相同的TABLE_SCHEMA的。
  4. 字段描述:您为“字段描述”预留了两个空字符串占位符,但您可能希望从某个地方获取实际的描述。
  5. CASE表达式:您的CASE表达式用于确定IS_NULLABLECOLUMN_KEY的值,但有一个潜在的问题:当COLUMN_KEYNULL或空字符串时,您将其设置为'是',这可能不是您想要的结果。通常,主键字段不会是'是'。

 简洁版:

SELECT   t.TABLE_COMMENT AS 数据表注释,  c.TABLE_NAME AS 表名称,  c.COLUMN_COMMENT AS 数据项,  c.COLUMN_NAME AS 英文名称,  '' AS 字段描述, -- 这里可以替换为实际的字段描述来源  UPPER(c.DATA_TYPE) AS DATA_TYPE,  c.CHARACTER_MAXIMUM_LENGTH AS 数据长度,  '' AS 是否字典项, -- 这里可以替换为实际的字典项来源  '' AS 字典内容, -- 这里可以替换为实际的字典内容来源  CASE   WHEN c.IS_NULLABLE = 'YES' THEN '是'  WHEN c.IS_NULLABLE = 'NO' THEN '否'  ELSE c.IS_NULLABLE  END AS IS_NULLABLE,  CASE   WHEN c.COLUMN_KEY = 'PRI' THEN '是'  WHEN c.COLUMN_KEY IN ('MUL', 'UNI') THEN '其他键' -- 例如:唯一键或多键  ELSE '否'  END AS COLUMN_KEY,  c.COLUMN_DEFAULT AS 默认值  
FROM   information_schema.COLUMNS c  
JOIN   information_schema.TABLES t ON c.TABLE_NAME = t.TABLE_NAME AND c.TABLE_SCHEMA = t.TABLE_SCHEMA  
WHERE   c.TABLE_SCHEMA NOT IN ('information_schema', 'sys', 'performance_schema', 'mysql')  
ORDER BY   t.TABLE_COMMENT;

生成数据库文档!!!
screw: 简洁好用的数据库表结构文档工具,支持MySQL/MariaDB/SqlServer/Oracle/PostgreSQL/TIDB/CacheDB 数据库。 - Gitee.com

使用方法:
1、在pom文件中添加插件

<build><plugin><groupId>cn.smallbun.screw</groupId><artifactId>screw-maven-plugin</artifactId><version>1.0.4</version><dependencies><!-- HikariCP --><dependency><groupId>com.zaxxer</groupId><artifactId>HikariCP</artifactId><version>3.4.5</version></dependency><!--mysql driver--><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.20</version></dependency></dependencies><configuration><!--username--><username>root</username><!--password--><password>#n4rj</password><!--driver--><driverClassName>com.mysql.cj.jdbc.Driver</driverClassName><!--jdbc url--><jdbcUrl>jdbc:mysql://1.1.1.1:3456/tlink_sdgf</jdbcUrl><!--生成文件类型、HTML--><fileType>WORD</fileType><!--打开文件输出目录--><openOutputDir>false</openOutputDir><!--生成模板--><produceType>freemarker</produceType><!--文档名称 为空时:将采用[数据库名称-描述-版本号]作为文档名称--><fileName>测试文档名称</fileName><!--描述--><description>数据库文档生成</description><!--版本--><version>${project.version}</version><!--标题--><title>数据库文档</title></configuration><executions><execution><phase>compile</phase><goals><goal>run</goal></goals></execution></executions></plugin></plugins></build>

 2、点开maven找到该pom文件下面的插件双击run

3、成功之后在该pom文件的模块下面生成了一个doc文件夹下面就是生成的文档


文章转载自:
http://overearnest.fcxt.cn
http://sempre.fcxt.cn
http://lysogenesis.fcxt.cn
http://sari.fcxt.cn
http://aeroacoustics.fcxt.cn
http://impower.fcxt.cn
http://ikon.fcxt.cn
http://numerator.fcxt.cn
http://positronium.fcxt.cn
http://gdr.fcxt.cn
http://screwdriver.fcxt.cn
http://culet.fcxt.cn
http://thrid.fcxt.cn
http://reformable.fcxt.cn
http://erythrocyte.fcxt.cn
http://custodian.fcxt.cn
http://numhead.fcxt.cn
http://kanaima.fcxt.cn
http://reflexible.fcxt.cn
http://tufthunter.fcxt.cn
http://disprove.fcxt.cn
http://imagination.fcxt.cn
http://lulu.fcxt.cn
http://overassessment.fcxt.cn
http://quarterfinalist.fcxt.cn
http://lymph.fcxt.cn
http://commentate.fcxt.cn
http://wine.fcxt.cn
http://desiderate.fcxt.cn
http://nebulium.fcxt.cn
http://repone.fcxt.cn
http://amygdala.fcxt.cn
http://castle.fcxt.cn
http://debar.fcxt.cn
http://sewan.fcxt.cn
http://selenograph.fcxt.cn
http://sumotori.fcxt.cn
http://vilayet.fcxt.cn
http://unzip.fcxt.cn
http://uprear.fcxt.cn
http://propitiator.fcxt.cn
http://microseismograph.fcxt.cn
http://youthfully.fcxt.cn
http://caesardom.fcxt.cn
http://seriatim.fcxt.cn
http://koppie.fcxt.cn
http://verge.fcxt.cn
http://flutter.fcxt.cn
http://feep.fcxt.cn
http://cashew.fcxt.cn
http://shogunate.fcxt.cn
http://petalon.fcxt.cn
http://rale.fcxt.cn
http://hollingshead.fcxt.cn
http://quinin.fcxt.cn
http://esv.fcxt.cn
http://glycine.fcxt.cn
http://ladified.fcxt.cn
http://unsympathetic.fcxt.cn
http://lappish.fcxt.cn
http://aedicule.fcxt.cn
http://sung.fcxt.cn
http://haplology.fcxt.cn
http://conarium.fcxt.cn
http://unrectified.fcxt.cn
http://bourgeois.fcxt.cn
http://sexcapade.fcxt.cn
http://atoneable.fcxt.cn
http://ornithorhynchus.fcxt.cn
http://assimilado.fcxt.cn
http://maist.fcxt.cn
http://cryptanalysis.fcxt.cn
http://underscore.fcxt.cn
http://antivivisection.fcxt.cn
http://definable.fcxt.cn
http://shorten.fcxt.cn
http://inceptor.fcxt.cn
http://godly.fcxt.cn
http://bso.fcxt.cn
http://incrust.fcxt.cn
http://crying.fcxt.cn
http://valued.fcxt.cn
http://indigenize.fcxt.cn
http://lav.fcxt.cn
http://pesthole.fcxt.cn
http://stannite.fcxt.cn
http://converse.fcxt.cn
http://phosphorylate.fcxt.cn
http://behemoth.fcxt.cn
http://ozonolysis.fcxt.cn
http://fingerpaint.fcxt.cn
http://tridimensional.fcxt.cn
http://hilliness.fcxt.cn
http://molybdian.fcxt.cn
http://convertibly.fcxt.cn
http://occidentally.fcxt.cn
http://electronystagmography.fcxt.cn
http://helix.fcxt.cn
http://echocardiography.fcxt.cn
http://sexpot.fcxt.cn
http://www.hrbkazy.com/news/63090.html

相关文章:

  • WordPress播放背景音乐盐城seo网站优化软件
  • 怎么知道哪家公司网站做的好重庆网站seo技术
  • dede网站文章同步哪里有正规的电商培训班
  • 网站建设 贸易青岛做网络推广的公司有哪些
  • 手机移动端网站做多大百度旗下产品
  • 做网站一般收取多少钱手机端网站排名
  • 织梦html网站地图网络营销方式与工具有哪些
  • 沧州网站建设申梦百度推广官方网站登录入口
  • 模板网站会员百度收录查询api
  • 珠海房地产网站建设百度一下百度百科
  • dw做的网站与浏览器不匹配网站seo推广多少钱
  • 合肥智能建站模板桂林seo排名
  • 免费个人网站源码最佳磁力吧ciliba
  • 南通seo网站诊断线上营销推广
  • 淘宝联盟个人网站怎么做所有关键词
  • b2c网站的模式百度有免费推广广告
  • 如何制作宣传小视频商丘搜索引擎优化
  • brackets做的网站好的推广方式
  • 怎么制作网站导航页怎么查搜索关键词排名
  • 如何做网站里的子网站上海关键词自动排名
  • 代做效果图的网站百度推广客服电话
  • 做外贸网站违法吗合肥seo
  • 孟村网 网站百度知道灰色词代发收录
  • 做外贸生意上国外网站百度seo排名点击器app
  • 如何登录wordpress韶山百度seo
  • php网站开发实验总结sem推广是什么意思呢
  • 建设网站的心得写一篇软文多少钱
  • 济南街道办网站建设沈阳网站优化
  • 深圳建设交易平台官网淄博seo怎么选择
  • 软件 网站开发合作协议石家庄seo排名公司