mysql show table like

相關問題 & 資訊整理

mysql show table like

You need to use the WHERE clause. As shown in the docs, you can only have a single pattern if you use "SHOW TABLES LIKE ..." , but you can use an expression in the WHERE clause if you use "SHOW TABLES WHERE ..." . Since you want an ex, It's possible but you have to know that column name returned from SHOW TABLES query is concatenation of string tables_in_ and your database name. So it would look like this, for database test : SHOW TABLES WHERE tables_in_test NOT LIKE '-_%' ,Ouch, this is an unfortunate schema to be working with. You're best off in the long run to do away with these date-dependent table names. However, you can get it from information_schema : SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SC,Use the information_schema: SELECT table_name AS c FROM information_schema.tables WHERE table_schema = DATABASE(). , Try this: SHOW TABLES FROM database WHERE Tables_in_database LIKE 'wp_%' AND Tables_in_database NOT REGEXP 'wp_[0-9]+'. ie, remove the % character from regex.,SHOW TABLES lists the non- TEMPORARY tables in a given database. You can also get this list using the mysqlshow db_name command. The LIKE clause, if present, indicates which table names to match. The WHERE clause can be given to select rows using more gen, mysql> SELECT DATABASE(); 列出目前預設的資料庫名稱 mysql> SHOW DATABASES; 列出所有資料庫 mysql> SHOW DATABASES LIKE 'my%'; 列出所有資料庫名稱為my 開頭的 mysql> SHOW TABLES FROM db_name [LIKE ...]; 列出該資料庫所有資料表名稱 mysql> SHOW COLUMNS FROM table_name ...,Summary: in this tutorial, you will learn how to use the MySQL SHOW TABLES command to query tables in a particular database. MySQL SHOW TABLES To list tables in a MySQL database, you follow these steps: Login to the MySQL database server using a MySQL cli,MySQL中有很多的基本命令,show命令也是其中之一,在很多使用者中对show命令的使用还容易产生混淆,本文汇集了show命令的众多用法。 a. show tables或show tables from database_name; — 显示当前数据库中所有表的名称。 b. show tables like 'my_%'; — 显示当前数据库中以my_开头的表。 c. show databases ...

相關軟體 MySQL 資訊

MySQL
MySQL 是一個開源的 RDBMS(關係數據庫管理系統),它支持用 C,C ++,Java,Perl 和 PHP 等各種編程語言編寫的請求。由於其高速度和靈活性,MySQL 已成為主要用於開發各種形狀和大小的 Web 應用程序的最流行的數據庫系統之一。自 1995 年上市以來,這種非常受歡迎的開源數據庫管理系統已經應用於當今幾乎所有互聯網用戶的無數項目中。今天一些最受歡迎的 MySQL 用戶是 ... MySQL 軟體介紹

mysql show table like 相關參考資料
mysql - SHOW TABLES statement with multiple LIKE values - Stack ...

You need to use the WHERE clause. As shown in the docs, you can only have a single pattern if you use "SHOW TABLES LIKE ..." , but you can use an expression in the WHERE clause if you use &...

https://stackoverflow.com

mysql - matching tables name with show tables - Stack Overflow

It's possible but you have to know that column name returned from SHOW TABLES query is concatenation of string tables_in_ and your database name. So it would look like this, for database test : S...

https://stackoverflow.com

mysql - Show tables like 'year%' >=2010 - Stack Overflow

Ouch, this is an unfortunate schema to be working with. You're best off in the long run to do away with these date-dependent table names. However, you can get it from information_schema : SELECT T...

https://stackoverflow.com

mysql - How to do "show tables as col" alike stuff? - Stack Overflow

Use the information_schema: SELECT table_name AS c FROM information_schema.tables WHERE table_schema = DATABASE().

https://stackoverflow.com

mysql - Show tables with LIKE and NOT REGEXP - Stack Overflow

Try this: SHOW TABLES FROM database WHERE Tables_in_database LIKE 'wp_%' AND Tables_in_database NOT REGEXP 'wp_[0-9]+'. ie, remove the % character from regex.

https://stackoverflow.com

MySQL 5.7 Reference Manual :: 13.7.5.37 SHOW TABLES Syntax

SHOW TABLES lists the non- TEMPORARY tables in a given database. You can also get this list using the mysqlshow db_name command. The LIKE clause, if present, indicates which table names to match. The ...

https://dev.mysql.com

MySQL 基本操作語法@ 隨便寫寫的新天地:: 痞客邦::

mysql> SELECT DATABASE(); 列出目前預設的資料庫名稱 mysql> SHOW DATABASES; 列出所有資料庫 mysql> SHOW DATABASES LIKE 'my%'; 列出所有資料庫名稱為my 開頭的 mysql> SHOW TABLES FROM db_name [LIKE ...]; 列出該資料庫所有資料表名稱 ...

http://tsuozoe.pixnet.net

MySQL SHOW TABLES: List Tables In a MySQL Database

Summary: in this tutorial, you will learn how to use the MySQL SHOW TABLES command to query tables in a particular database. MySQL SHOW TABLES To list tables in a MySQL database, you follow these step...

http://www.mysqltutorial.org

MySQL Show命令总结- 哈哈笑- 混迹互联网 - TechWeb

MySQL中有很多的基本命令,show命令也是其中之一,在很多使用者中对show命令的使用还容易产生混淆,本文汇集了show命令的众多用法。 a. show tables或show tables from database_name; — 显示当前数据库中所有表的名称。 b. show tables like 'my_%'; — 显示当前数据库中以my_开头的表。 c. show ...

http://hahaxiao.techweb.com.cn