日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

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

新聞中心

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

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

成都創(chuàng)新互聯(lián)公司成都網(wǎng)站建設(shè)按需定制制作,是成都網(wǎng)站推廣公司,為iso認(rèn)證提供網(wǎng)站建設(shè)服務(wù),有成熟的網(wǎng)站定制合作流程,提供網(wǎng)站定制設(shè)計(jì)服務(wù):原型圖制作、網(wǎng)站創(chuàng)意設(shè)計(jì)、前端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 - 找到的表的名稱?

當(dāng)前名稱:MySQL關(guān)于查找模式對象的語句
URL分享:http://www.dlmjj.cn/article/dpeihsj.html