Select data from “show tables” MySQL query

后端 未结 13 1756
难免孤独
难免孤独 2020-12-01 04:15

Is it possible to select from show tables in MySQL?

SELECT * FROM (SHOW TABLES) AS `my_tables`

Something along these lines, th

13条回答
  •  借酒劲吻你
    2020-12-01 04:33

    in MySql 5.1 you can try

    show tables like 'user%';
    

    output:

    mysql> show tables like 'user%';
    
    +----------------------------+
    
    | Tables_in_test (user%) |
    
    +----------------------------+
    
    | user                       |
    
    | user_password              |
    
    +----------------------------+
    
    2 rows in set (0.00 sec)
    

提交回复
热议问题