日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
MySQL關(guān)于查找模式對象的語句

在日常工作中,搜索特定的數(shù)據(jù)庫對象,是最常見的一個工作,下面分享幾個關(guān)于mysql模式查找的語句。

成都創(chuàng)新互聯(lián)公司成都網(wǎng)站建設(shè)按需定制制作,是成都網(wǎng)站推廣公司,為iso認證提供網(wǎng)站建設(shè)服務(wù),有成熟的網(wǎng)站定制合作流程,提供網(wǎng)站定制設(shè)計服務(wù):原型圖制作、網(wǎng)站創(chuàng)意設(shè)計、前端HTML5制作、后臺程序開發(fā)等。成都網(wǎng)站營銷推廣熱線:028-86922220

1. 在 MySQL 數(shù)據(jù)庫中查找名稱中包含數(shù)字的表

select table_schema as database_name,
table_name
from information_schema.tables
where table_type = 'BASE TABLE'
and table_name rlike ('[0-9]')
order by table_schema,
table_name;

說明:

  • database_name - 找到表的數(shù)據(jù)庫(模式)的名稱
  • table_name - 找到的表的名稱

2. 在 MySQL 數(shù)據(jù)庫中查找關(guān)于特定列名的表

select tab.table_schema as database_name,
tab.table_name
from information_schema.tables as tab
inner join information_schema.columns as col
on col.table_schema = tab.table_schema
and col.table_name = tab.table_name
where tab.table_type = 'BASE TABLE'
and column_name = 'idcity'
order by tab.table_schema,
tab.table_name;

說明:

  • database_name - 找到表的數(shù)據(jù)庫(模式)的名稱
  • table_name - 找到的表的名稱

3. 在 MySQL 數(shù)據(jù)庫中查找沒有特定名稱的列的表

select tab.table_schema as database_name,
tab.table_name
from information_schema.tables tab
left join information_schema.columns col
on tab.table_schema = col.table_schema
and tab.table_name = col.table_name
and col.column_name = 'id' -- put column name here
where tab.table_schema not in ('information_schema', 'mysql',
'performance_schema', 'sys')
and tab.table_type = 'BASE TABLE'
and col.column_name is null
order by tab.table_schema,
tab.table_name;

說明:

  • database_name - 找到的表的數(shù)據(jù)庫(模式)名稱
  • table_name - 找到的表的名稱?

當前標題:MySQL關(guān)于查找模式對象的語句
標題網(wǎng)址:http://m.5511xx.com/article/dpeihsj.html