获取MySql元数据

获取某个数据库下的所有表名信息

select * from information_schema.tables where table_schema='库名称'

获取某个库某个表的字段信息

select * from information_schema.columns where table_schema = '数据库名称' and table_name = '表名' order by ORDINAL_POSITION asc

批量查询后插入

Insert into 表(字段1,字段2) select 字段1,字段2 from 表

posted @     阅读(85)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
点击右上角即可分享
微信分享提示