从数据库获取表名 [英] Get table names from a database

查看:56
本文介绍了从数据库获取表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了许多网站,但没有遇到任何从单个数据库获取表名的细节的代码或教程.

I've searched through a bunch of websites and I have not come across any code or tutorial which has gone through the specifics of obtaining the table names from a single database.

假设我有4个数据库,并且想要数据库中所有名为mp21的表的名称,我可以使用什么查询?

Assuming I have 4 databases and I want the names of all the tables within the database called mp21, what query can I use?

推荐答案

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'

这篇关于从数据库获取表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆