如何批量从sql语句中提取表名

简介

使用的卢易表 的提取表名功能,可以从sql语句中批量提取表名。采用纯文本sql语法分析,无需连接数据库,支持从含非sql语句的文件文件中提取,支持各类数据库sql语法。

特点

快:从成百个文件中提取上千个表名只需1s

准:迄今为止从纯sql文件中提取表名的准确率为100%,从包含非sql语句的文件中提取的表名完整度为100%

狠:采用纯文本sql语法分析,无需连接数据库,支持从含非sql语句的文件文件中提取,支持各类数据库sql语法

使用方法

1.点击【提取表名】

2.选择需要提取表名的文本文件,可多选

3.点击开始

示例

sql 复制代码
支持错误语法
支持包含非sql文本
支持各种文本文件格式
with tmp_table1 as( 
select 
a.id as id, 
b.name as name, -- from 
c.city,
' from 
aa',
--select * from comment_table1 a join comment_table2 b on a.id = b.id where 1=1
66/*select * from comment_table3 a join comment_table4 b on a.id = b.id
where 1=1
--test
*/
,
(select a.name from country a where a.id = c.countryid) as country,
'---',
(select nvl(c.country,' ') from dual as a) as country1,
a.amount,
decode(d.email,'xxx',' select ',nvl(e.name,' from ')),
'a
aa' name1,
' where ' as  test
from order as a 
left join user1. customer b on (a.custid = b.id)  and b.sex in ('0','1','2')
join address c on c.id = b.addressid
left join (select custid, max(email) email from contact a where email is not null group by custid) d on d.custid =b.id,
company e
where e.id = b.companyid
union all
select 
*
from (select * from order as b) as a ,(select * from customer as b) b --,comment_table3
, address c 
,(select custid, max(email) email from contact a where email is not null group by custid) d 
where a.id = (select 1 from dual)
and b.custid = subsrr(b.id,1,8)
and b.addressid = c.id
and d.custid = b.id
),
tmp_table2 AS
(
select * from (select * from user1 . order a join user2.customer b on a.custid = b.id)
)
select a.custid, sum(amount) from tmp_table1 a, tmp_table2 b 
where a.id = b.id
and a.id exists(select * from order c where c.amout >= 10000 )
and b.date >= add_months((select sysdate from dual),-12)
group by a.custid

提取结果:

附软件官方网站及下载地址:

的卢易表官方网站http://www.diluauto.com/products/dilu-easyexcel.html

相关推荐
凌虚8 小时前
面向 MySQL 用户的 PostgreSQL 快速上手指南
数据库·后端·架构
五阿哥永琪8 小时前
MySQL中操作json的函数!
数据库·mysql·json
来者皆善8 小时前
了解Mysql优化吗?如何优化索引?
数据库·mysql
赤壁小虾11 小时前
【渲染流水线】[逐片元阶段]-[透明度测试]以UnityURP为例
java·前端·数据库
MC皮蛋侠客11 小时前
SQLAlchemy 系列(七):高级建模与高效写入——批量 DML、方言与扩展
数据库·python
奈斯先生Vector12 小时前
把 Midjourney 二次编辑做成生产系统:customId 能力令牌、Action Graph 与 WebUI 精修工作台
数据库·人工智能·架构·aigc·音视频·midjourney
Lethehong12 小时前
双擎并驱·全链路并行:KFS让TB级异构增量同步秒级到达
数据库
MC皮蛋侠客12 小时前
SQLAlchemy 系列(八):AsyncIO、并发与 Web 生命周期——让每个并发任务持有自己的 Session
数据库·python
一水13 小时前
Redis实战:一个AI工作流系统里的五个应用场景,从传参到限流的完整链路
数据库·redis·wpf
枫叶v.14 小时前
Prompt Injection 防不住怎么办?从 Source-Sink 模型设计 Agent 安全边界
数据库·安全·prompt