简体   繁体   English

如何不使用过程从mysql上显示的语法中选择表?

[英]How to select table from syntax show on mysql, without using procedure?

i have read this article Select data from “show tables” MySQL query . 我已阅读本文, 从“显示表” MySQL查询中选择数据 But i need to get table from show tables. 但是我需要从显示表中获取表。 I try this syntax at the first. 我首先尝试这种语法。

show tables from pos where tables_in_pos like (select kdtk from toko) 显示pos中的表,而tables_in_pos一样(从toko中选择kdtk)

and then the value has show 然后值显示

+-------------------+ + ------------------- +
| | tables_in_pos | table_in_pos |

+-------------------+ + ------------------- +
| | fnpk | fnpk |

after that i try this syntax 之后,我尝试这种语法

select * from concat(show tables from pos where tables_in_pos like (select kdtk from toko),'a') as Hasil select * from concat(显示pos中的表,其中tables_in_pos像(从toko中选择kdtk),'a')为Hasil

How to select table from syntax Show on mysql? 如何从MySQL语法显示中选择表? without using Procedure. 不使用过程。

如下使用查询,您需要在查询中包括条件以使其符合您的要求:

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='your DB_Name' AND........{additional conditions }....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM