获取特定 MySQL 数据库中的非空表列表?
来源:tutorialspoint
2023-09-06 19:47:53
0浏览
收藏
积累知识,胜过积蓄金银!毕竟在数据库开发的过程中,会遇到各种各样的问题,往往都是一些细节知识点还没有掌握好而导致的,因此基础知识点的积累是很重要的。下面本文《获取特定 MySQL 数据库中的非空表列表?》,就带大家讲解一下知识点,若是你对本文感兴趣,或者是想搞懂其中某个知识点,就请你继续往下看吧~
要获取特定 MySQL 数据库中的非空表列表,语法如下 -
SELECT table_type,table_name, table_schema from information_schema.tables where table_rows >= 1 and table_schema = 'yourDatabaseName';
为您的数据库实现上述语法。这里,我们的数据库是“test”。查询如下 -
mysql> select table_type,table_name ,table_schema from information_schema.tables −> where table_rows >= 1 and table_schema = 'test';
以下是显示数据库“test”中非空表的输出 -
+------------+------------------------------+--------------+ | TABLE_TYPE | TABLE_NAME | TABLE_SCHEMA | +------------+------------------------------+--------------+ | BASE TABLE | add30minutesdemo | test | | BASE TABLE | addoneday | test | | BASE TABLE | agecalculatesdemo | test | | BASE TABLE | aliasdemo | test | | BASE TABLE | allcharacterbeforespace | test | | BASE TABLE | allownulldemo | test | | BASE TABLE | autoincrementdemo | test | | BASE TABLE | betweendatedemo | test | | BASE TABLE | bookdatedemo | test | | BASE TABLE | changecolumnpositiondemo | test | | BASE TABLE | concatenatetwocolumnsdemo | test | | BASE TABLE | cumulativesumdemo | test | | BASE TABLE | currentdatetimedemo | test | | BASE TABLE | dateasstringdemo | test | | BASE TABLE | dateformatdemo | test | | BASE TABLE | dateinsertdemo | test | | BASE TABLE | datesofoneweek | test | | BASE TABLE | datetimedemo | test | | BASE TABLE | dayofweekdemo | test | | BASE TABLE | decimaltointdemo | test | | BASE TABLE | defaultdemo | test | | BASE TABLE | deletemanyrows | test | | BASE TABLE | differencetimestamp | test | | BASE TABLE | distinctdemo | test | | BASE TABLE | employee | test | | BASE TABLE | employeedesignation | test | | BASE TABLE | findlowercasevalue | test | | BASE TABLE | generatingnumbersdemo | test | | BASE TABLE | gmailsignin | test | | BASE TABLE | groupbytwofieldsdemo | test | | BASE TABLE | groupmonthandyeardemo | test | | BASE TABLE | highestnumberdemo | test | | BASE TABLE | ifnulldemo | test | | BASE TABLE | insertignoredemo | test | | BASE TABLE | insertwithmultipleandsigle | test | | BASE TABLE | int11demo | test | | BASE TABLE | intvsintanythingdemo | test | | BASE TABLE | lasttwocharacters | test | | BASE TABLE | likebinarydemo | test | | BASE TABLE | likedemo | test | | BASE TABLE | maxlengthfunctiondemo | test | | BASE TABLE | newtableduplicate | test | | BASE TABLE | notequalsdemo | test | | BASE TABLE | nowandcurdatedemo | test | | BASE TABLE | nthrecorddemo | test | | BASE TABLE | nullandemptydemo | test | | BASE TABLE | orderbycharacterlength | test | | BASE TABLE | orderbynullfirstdemo | test | | BASE TABLE | orderindemo | test | | BASE TABLE | originaltable | test | | BASE TABLE | parsedatedemo | test | | BASE TABLE | passinganarraydemo | test | | BASE TABLE | prependstringoncolumnname | test | | BASE TABLE | pricedemo | test | | BASE TABLE | queryresultdemo | test | | BASE TABLE | replacedemo | test | | BASE TABLE | rowexistdemo | test | | BASE TABLE | rowpositiondemo | test | | BASE TABLE | rowwithsamevalue | test | | BASE TABLE | safedeletedemo | test | | BASE TABLE | searchtextdemo | test | | BASE TABLE | selectdataonyearandmonthdemo | test | | BASE TABLE | selectdistincttwocolumns | test | | BASE TABLE | skiplasttenrecords | test | | BASE TABLE | stringreplacedemo | test | | BASE TABLE | stringtodate | test | | BASE TABLE | student | test | | BASE TABLE | studentdemo | test | | BASE TABLE | studentmodifytabledemo | test | | BASE TABLE | studenttable | test | | BASE TABLE | subtract3hours | test | | BASE TABLE | temporarycolumnwithvaluedemo | test | | BASE TABLE | timetosecond | test | | BASE TABLE | timetoseconddemo | test | | BASE TABLE | toggledemo | test | | BASE TABLE | toogledemo | test | | BASE TABLE | updatevalueincrementally | test | | BASE TABLE | wheredemo | test | | BASE TABLE | wholewordmatchdemo | test | | BASE TABLE | zipcodepadwithzerodemo +------------+------------------------------+--------------+ 80 rows in set (0.00 sec)
好了,本文到此结束,带大家了解了《获取特定 MySQL 数据库中的非空表列表?》,希望本文对你有所帮助!关注golang学习网公众号,给大家分享更多数据库知识!
版本声明
本文转载于:tutorialspoint 如有侵犯,请联系study_golang@163.com删除

- 上一篇
- 在MySQL中,如何以用户指定的其他格式显示日期?

- 下一篇
- 如果 MySQL 会话结束,MySQL 临时表会发生什么?
查看更多
最新文章
-
- 数据库 · MySQL | 1小时前 |
- MySQL替换值攻略:UPDATE语句详解
- 213浏览 收藏
-
- 数据库 · MySQL | 2小时前 |
- MySQL增删改查命令速查手册
- 436浏览 收藏
-
- 数据库 · MySQL | 2小时前 |
- MySQL主键详解:定义及功能解析
- 145浏览 收藏
-
- 数据库 · MySQL | 3小时前 | varchar ForeignKey CREATETABLE PRIMARYKEY AUTO_INCREMENT
- MySQL建表语句详解及标准SQL语法指南
- 493浏览 收藏
-
- 数据库 · MySQL | 3小时前 |
- 从零学mysql操作,数据库使用攻略
- 188浏览 收藏
-
- 数据库 · MySQL | 4小时前 | mysql MariaDB innodb myisam MichaelWidenius
- MySQL英文全称及名称起源揭秘
- 126浏览 收藏
-
- 数据库 · MySQL | 4小时前 |
- MySQL中英文界面切换技巧,轻松上手
- 161浏览 收藏
-
- 数据库 · MySQL | 4小时前 |
- MySQL中英文界面自由切换的实用技巧
- 321浏览 收藏
-
- 数据库 · MySQL | 5小时前 | 索引 表结构 降序排序 DESC SHOWCREATETABLE
- MySQL中desc的用法:降序排序和表结构查看
- 167浏览 收藏
-
- 数据库 · MySQL | 5小时前 | 权限管理 字符集 排序规则 CREATEDATABASE IFNOTEXISTS
- MySQL建库详解:createdatabase命令使用
- 297浏览 收藏
-
- 数据库 · MySQL | 6小时前 |
- MySQL事务详解:特性与作用深度剖析
- 141浏览 收藏
-
- 数据库 · MySQL | 6小时前 |
- MySQL中文版全流程:语言包安装与配置
- 263浏览 收藏
查看更多
课程推荐
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 542次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 508次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 497次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 484次学习
查看更多
AI推荐
-
- 魔匠AI
- SEO摘要魔匠AI专注于高质量AI学术写作,已稳定运行6年。提供无限改稿、选题优化、大纲生成、多语言支持、真实参考文献、数据图表生成、查重降重等全流程服务,确保论文质量与隐私安全。适用于专科、本科、硕士学生及研究者,满足多语言学术需求。
- 22次使用
-
- PPTFake答辩PPT生成器
- PPTFake答辩PPT生成器,专为答辩准备设计,极致高效生成PPT与自述稿。智能解析内容,提供多样模板,数据可视化,贴心配套服务,灵活自主编辑,降低制作门槛,适用于各类答辩场景。
- 37次使用
-
- Lovart
- SEO摘要探索Lovart AI,这款专注于设计领域的AI智能体,通过多模态模型集成和智能任务拆解,实现全链路设计自动化。无论是品牌全案设计、广告与视频制作,还是文创内容创作,Lovart AI都能满足您的需求,提升设计效率,降低成本。
- 49次使用
-
- 美图AI抠图
- 美图AI抠图,依托CVPR 2024竞赛亚军技术,提供顶尖的图像处理解决方案。适用于证件照、商品、毛发等多场景,支持批量处理,3秒出图,零PS基础也能轻松操作,满足个人与商业需求。
- 47次使用
-
- PetGPT
- SEO摘要PetGPT 是一款基于 Python 和 PyQt 开发的智能桌面宠物程序,集成了 OpenAI 的 GPT 模型,提供上下文感知对话和主动聊天功能。用户可高度自定义宠物的外观和行为,支持插件热更新和二次开发。适用于需要陪伴和效率辅助的办公族、学生及 AI 技术爱好者。
- 45次使用
查看更多
相关文章
-
- MySQL主从切换的超详细步骤
- 2023-01-01 501浏览
-
- Mysql-普通索引的 change buffer
- 2023-01-25 501浏览
-
- MySQL高级进阶sql语句总结大全
- 2022-12-31 501浏览
-
- Mysql报错:message from server: * is blocked because of many
- 2023-02-24 501浏览
-
- 腾讯云大佬亲码“redis深度笔记”,不讲一句废话,全是精华
- 2023-02-22 501浏览