查询tablename 数据库中 以"_copy" 结尾的表

select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy';

information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问
information_schema.tables 指数据库中的表(information_schema.columns 指列)
table_schema 指数据库的名称
table_type 指是表的类型(base table 指基本表,不包含系统表)
table_name 指具体的表名

如果本身是在tablename 这个库里新建的查询,可以去掉 table_schema='tablename ' 这一句
select table_name from information_schema.tables where table_type='base table' and table_name like '%_copy';

在Informix数据库中,如何查询表名中包含某字段的表

select * from systables where tabname like 'saa%'
此法只对Informix数据库有用

查询指定数据库中指定表的所有字段名column_name

select column_name from information_schema.columns where table_schema='csdb' and table_name='xxx'

检查数据库'test'中的某一个表'd_ad'是否存在

select count(1) from information_schema.tables where table_schema = 'test' and table_name = 'd_ad';

如何查询mysql数据库中有多少张表

select count(*) TABLES, table_schema from information_schema.tables where table_schema = 'test' group by table_schema;

参考:
[1].https://blog.csdn.net/zhanglehes/article/details/18603641
[2].https://blog.csdn.net/yuxiongjie/article/details/45486033

MySQL中 如何查询表名中包含某字段的表的更多相关文章

  1. MySQL中 如何查询表名中包含某字段的表 ,查询MySql数据库架构信息:数据库,表,表字段

    --查询tablename 数据库中 以"_copy" 结尾的表 select table_name from information_schema.tables where ta ...

  2. Oracle 查询表的索引包含的字段

    Oracle 查询表的索引包含的字段 select a.uniqueness 索引类型,b.index_name 索引名称,b.column_name 字段 from user_indexes a , ...

  3. oracle 查看表是否存在、包含某字段的表、表是否包含字段

    表是否存在: select count(*) from user_tables where table_name = #{tablename} 包含某个字段的表 select * from user_ ...

  4. 【LOB】使用USER_LOBS视图获得当前用户包含LOB字段的表

    包含LOB类型字段的表往往需要特殊关照,如何快速的获得包含LOB对象的数据库表?使用DBA_LOBS.ALL_LOBS和USER_LOBS视图可以很方便地获得包含BLOB或CLOB字段的表. 简单看一 ...

  5. SQLserver查询库中包含某个字段的表

    select [name] from [TPMS_PRD].[dbo].sysobjects where id in(select id from [TPMS_PRD].[dbo].syscolumn ...

  6. 查询SQL中某表里有多少列包含某字段

    select c.name from SYSCOLUMNS as c left join SYSOBJECTS as t on c.id=t.id where c.name like '这里是某个字段 ...

  7. oracle查询包含某个字段的表

    select column_name,table_name,data_type ,data_length,data_precision,data_scale from DBA_TAB_COLUMNS ...

  8. 包含Blob字段的表无法Export/Import

    最近一直用MySQL-Front的导出导出工具完成数据库的备份,确实比较方便快捷. 后来增加了一张表,其中有blob字段,上传几个文件后,发现导出不好用了,进度条长期处于停滞状态. 想想也是,要把bl ...

  9. sql server 查询某数据库中包含某字段的所有表格

    场景:查询DNMes数据库中所有包含RFID字段的表名 sql语句: select object_name(id) objName,Name as colName from syscolumns wh ...

随机推荐

  1. 二十二:制作app的时候超出部分不能滑动

    给需要滑动的区域写以下样式(父级是浏览器) position: absolute; left: 0; right: 0; bottom: 0; top: 0; overflow-x: hidden; ...

  2. Python-time模块-58

    time 模块: Eva_J import time time.sleep(100) #时间睡眠 print(time.time()) #返回一个以秒为单位的时间 时间模块 和时间有关系的我们就要用到 ...

  3. matplotlib 入门之Image tutorial

    文章目录 载入图像为ndarray 显示图像 调取各个维度 利用cmp 获得像素点的RGB的统计 通过clim来限定rgb 标度在下方 插值,马赛克,虚化 matplotlib教程学习笔记 impor ...

  4. WebPack牛刀小试

    现在页面的功能和需求越来越复杂,繁复杂乱的JavaScript代码和一大堆的依赖包都需要包含在前端页面中.如果还用手动处理就有点像在现代战场上使用小米加步枪的味道了. 为了减小开发的复杂度,前端社区涌 ...

  5. 【转】redis-cluster安装配置

    需要三台虚拟机(生产环境是3个物理机),分配静态IP.cluster中共6个节点.3主3从.本文中每个虚拟机上的redis端口:6379 6380. 需要注意的两点: 3个主节点分别位于3台虚拟机上, ...

  6. DDoS攻击、CC攻击的攻击方式和防御方法

    DDoS攻击.CC攻击的攻击方式和防御方法 - sochishun - 博客园https://www.cnblogs.com/sochishun/p/7081739.html cc攻击_百度百科htt ...

  7. jmeter接口测试------基础笔记

    1.postman发送json格式的post请求,直接放链接 row里面body放请求参数,得到请求结果 2.jmeter请求json时需要注意在请求前创建http信息头管理器,然后信息头添加一条名称 ...

  8. scoketio

    服务器代码let net = require('net'); // 创建服务器 let server = net.createServer(); // 定义一个数组 ,存放每一个连接服务器的客户端用户 ...

  9. Jquery 选择器 特殊字符 转义字符

    1.Jquery   选择器 id包含特殊字符,加双斜线 \\ 例 <input type="text" id="dbo_HouseInfo.HouseResour ...

  10. [转帖]你所不知道的C和C++运行库

    [C-C++]你所不知道的C和C++运行库 https://blog.csdn.net/humanking7/article/details/85887884 原作者也是转的blog 最近一个物理机上 ...