偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

MySQL關(guān)于查找模式對(duì)象的語(yǔ)句

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

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

1. 在 MySQL 數(shù)據(jù)庫(kù)中查找名稱中包含數(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;

說(shuō)明:

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

DBA技術(shù)分享(十二)- Mysql關(guān)于查找模式對(duì)象的語(yǔ)句

2. 在 MySQL 數(shù)據(jù)庫(kù)中查找關(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;

說(shuō)明:

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

DBA技術(shù)分享(十二)- Mysql關(guān)于查找模式對(duì)象的語(yǔ)句

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

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;

說(shuō)明:

  • database_name - 找到的表的數(shù)據(jù)庫(kù)(模式)名稱
  • table_name - 找到的表的名稱?
責(zé)任編輯:趙寧寧 來(lái)源: 今日頭條
相關(guān)推薦

2010-10-08 16:26:49

mysql查找

2011-05-25 10:03:00

JavaScriptwith

2010-11-25 11:07:28

MySQL慢查詢

2011-05-26 13:26:42

if

2011-08-01 10:35:26

數(shù)據(jù)庫(kù)外模式模式

2024-10-22 16:54:14

2017-04-12 10:04:18

Scrum實(shí)踐終結(jié)

2021-07-07 10:31:19

對(duì)象池模式解釋器模式設(shè)計(jì)模式

2010-10-08 16:05:30

MySQL DELET

2010-10-12 13:55:41

MySQL EXPLA

2011-08-29 17:13:03

外連接不等值連接等值連接

2011-08-23 15:34:56

Lua模式 匹配

2012-05-28 09:16:12

Java設(shè)計(jì)模式

2011-07-04 13:51:02

QT 對(duì)象 模型

2010-10-08 09:17:06

mysql修改字段

2010-10-08 16:42:31

MySQL表信息

2010-10-12 16:09:08

MySQL用戶權(quán)限

2009-11-11 09:11:19

2017-12-01 14:14:35

MySQL網(wǎng)絡(luò)傳輸協(xié)議網(wǎng)絡(luò)編程

2024-10-07 10:02:28

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)