2014-10-22 67 views

回答

1

可以使用波紋管定的查詢

SELECT 
    TABLE_NAME 
from 
    information_schema.TABLES 
where 
    TABLE_SCHEMA = 'Your_schema_name' 
     and TABLE_NAME LIKE '%_language'; 
0

Reference for MySQL SHOW command

可以simnply去SHOW命令,像

SHOW tables like '%_language'; 

然後,它會顯示選擇利用信息架構中的所有表MySQL DB中的所有表以表名結尾的名稱爲' _language」

mysql> SHOW TABLES LIKE '%_language'; 

輸出

+---------------------+ 
| Tables    | 
+---------------------+ 
| product_language | 
| category_language | 
+---------------------+ 
+0

感謝。但它在Laravel框架中無法正常工作。我使用這個:$ tables = DB :: select('SHOW tables like「%_language」'); dd($ tables); dd($ tables);並返回:array(2){ [0] object(stdClass)#730(1){ } [1] object(stdClass)#729(1){ } – Behzad 2014-10-22 07:56:50

相關問題