SQL语句检索表名和注释
可以使用以下SQL语句来检索出表名和注释:
SELECT table_name, table_comment
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
AND table_type = 'BASE TABLE';
其中,'your_database_name'需要替换为你的数据库名称。这个SQL语句将从'information_schema.tables'系统表中检索出所有的基本表,并返回它们的表名和注释。'table_schema'参数指定要检索的数据库名称,'table_type'参数指定要检索的表类型为基本表。
原文地址: https://www.cveoy.top/t/topic/lzZ0 著作权归作者所有。请勿转载和采集!