SqlAnalyzer功能:解析SQL语句,具体到字段,表和条件,并将其整理后输出格式化文本。

1.

原文=select a from b
整理后文本=
select
a
from
b

2.

原文=select a,b,c from tb,tc,td,tf f,tg g
整理后文本=
select
a,
b,
c
from
tb,
tc,
td,
tf f,
tg g

3.

原文=select name name,birthday b,column c from tb
整理后文本=
select
name name,
birthday b,
column c
from
tb

4.

原文=select name as name,birthday as b,column c from tb
整理后文本=
select
name name,
birthday b,
column c
from
tb

5.

原文=select name as name,birthday as b,column c from (select a,c,b from tb) tb
整理后文本=
select
name name,
birthday b,
column c
from
(
select
a,
c,
b
from
tb) tb

6.

原文=select name as name,birthday as b,column c from (select a,c,b from tb) tb,(select a1,a2,a3 from table_a) ta
整理后文本=
select
name name,
birthday b,
column c
from
(
select
a,
c,
b
from
tb) tb,
(
select
a1,
a2,
a3
from
table_a) ta

7.

原文=select name as name,birthday as b,column c from (select a,c,b from tb) tb,(select a1,a2,a3 from (select * from tbc) tbc) ta
整理后文本=
select
name name,
birthday b,
column c
from
(
select
a,
c,
b
from
tb) tb,
(
select
a1,
a2,
a3
from
(
select
*
from
tbc) tbc) ta

8.

原文=select name as name,birthday as b,column c from (select a,c,b from tb) tb,(select a1,a2,a3 from (select * from (select t1,t2,t3,t4,t5,t6 from test) t1) tbc) ta
整理后文本=
select
name name,
birthday b,
column c
from
(
select
a,
c,
b
from
tb) tb,
(
select
a1,
a2,
a3
from
(
select
*
from
(
select
t1,
t2,
t3,
t4,
t5,
t6
from
test) t1) tbc) ta

9.

原文=select name as name,birthday as b,column c from (select a,c,b from tb) tb,(select a1,a2,a3 from (select * from (select t1,t2,t3,t4,t5,t6 from (select t1,t2,t3,t4,t5,t6,t7 from table4 ) t2) t1) tbc) ta
整理后文本=
select
name name,
birthday b,
column c
from
(
select
a,
c,
b
from
tb) tb,
(
select
a1,
a2,
a3
from
(
select
*
from
(
select
t1,
t2,
t3,
t4,
t5,
t6
from
(
select
t1,
t2,
t3,
t4,
t5,
t6,
t7
from
table4) t2) t1) tbc) ta

10.

原文=select name as name,birthday as b,column c from tc c,tb b,(select a1,a2,a3 from (select * from tbc) tbc) ta
整理后文本=
select
name name,
birthday b,
column c
from
tc c,
tb b,
(
select
a1,
a2,
a3
from
(
select
*
from
tbc) tbc) ta

11.

原文=select (select f1,f2,f3 from tbable) as x,(select a from tc) as cnt from b
整理后文本=
select
(
select
f1,
f2,
f3
from
tbable) x,
(
select
a
from
tc) cnt
from
b

12.

原文=select name from tb where age=41
整理后文本=
select
name
from
tb
where
age=41

13.

原文=select name from tb where age=41 and level>9 or salary<30000
整理后文本=
select
name
from
tb
where
age=41 and
level>9 or
salary<30000

14.

原文=select name from tb where age=41 and level>9 or salary<30000 order by name
整理后文本=
select
name
from
tb
where
age=41 and
level>9 or
salary<30000
order by
name

15.

原文=select name from tb where age=41 and level>9 or salary<30000 order by name asc,id desc,age
整理后文本=
select
name
from
tb
where
age=41 and
level>9 or
salary<30000
order by
name asc,
id desc,
age

16.

原文=select name from tb where age=41 and level>9 or salary<30000 order by name,id desc,age asc
整理后文本=
select
name
from
tb
where
age=41 and
level>9 or
salary<30000
order by
name ,
id desc,
age asc

17.

原文=select name from tb where age=41 and level>9 or salary<30000 order by name,id,age,level
整理后文本=
select
name
from
tb
where
age=41 and
level>9 or
salary<30000
order by
name ,
id ,
age ,
level

十七个SQL都解析无误,嵌套sql也没有问题,今天,解析sql语句的夙愿终于达成了。

--2020-05-27--

用于测试SqlAnalyzer1.00的十七个测试用例的更多相关文章

  1. 用于测试 SqlAnalyzer1.01 的21个测试用例

    感慨:当年看着 https://www.cnblogs.com/heyang78/p/11451814.html 一文望洋兴叹,如今我也自己做出来了! 21. 原文=select name, cnt ...

  2. 用于测试 JsonAnalyzer2 1.01版的测试用例

    14. 原文={"animal":"ca,t","color":"ora:nge","isMale" ...

  3. 测试思想-测试设计 史上最详细测试用例设计实践总结 Part2

    史上最详细测试用例设计实践总结 by:授客 QQ:1033553122 -------------------------接 Part1-------------------------- 方法:这里 ...

  4. VMware配置回环地址用于测试

           我们在开发过程中,很可能需要一台服务器用于测试,在这种环境下,我们很可能需要用到vmware来构建这样的开发环境.但如果当前处在一个离线,或是不在网内的环境下,我们所搭建的环境有可能无法 ...

  5. Fundebug前端JavaScript插件更新至1.6.0,新增test()方法用于测试

    摘要: 1.6.0新增fundebug.test()方法用于测试,请大家及时更新. 默认情况下,Fundebug 插件能够自动捕获未处理的错误(uncaught error).另外,开发者也可以通过使 ...

  6. noi2019模拟测试赛(四十七)

    noi2019模拟测试赛(四十七) T1与运算(and) 题意: ​ 给你一个序列\(a_i\),定义\(f_i=a_1\&a_2\&\cdots\&a_i\),求这个序列的所 ...

  7. linux 创建虚拟块设备,制作文件系统并挂载,用于测试lustre

    1.制作块文件 3 个 [root@localhost yaoxu]# [root@localhost yaoxu]# [root@localhost yaoxu]# 2.创建回环设备 [root@l ...

  8. 【AMAD】splinter -- 用于测试web app的python框架

    简介 动机 作用 用法 热度分析 个人评分 简介 Splinter1是一个开源工具,使用Python编写,用于测试web apps.它可以用来对浏览器实现自动化操作,比如访问URLs,和按钮等交互. ...

  9. (转)用C#实现实现简单的 Ping 的功能,用于测试网络是否已经连通

    本文转载自:http://blog.csdn.net/xiamin/archive/2009/02/14/3889696.aspx 用C#实现实现简单的 Ping 的功能,用于测试网络是否已经联通 1 ...

随机推荐

  1. easyPOI使用

    更多的easyPOI资源的网在easypoi的官网. 1 在pom.xml中添加依赖 <dependency> <groupId>cn.afterturn</groupI ...

  2. 微信公众号添加zip文件下载

    微信公众号添加zip文件下载的教程 我们都知道创建一个微信公众号,在公众号中发布一些文章是非常简单的,但公众号添加附件下载的功能却被限制,如今可以使用小程序“微附件”进行在公众号中添加附件.如:zip ...

  3. Qt之先用了再说系列-多线程方式2

    继Qt之先用了再说系列-多线程方式2 本次说说在Qt里多线程使用第2种方式,也是qt官方比较推荐用的方式,相对与直接继承QThread 重写run方法中灵活了一些,如果第一次使用可能会转不湾来,没有直 ...

  4. C#LeetCode刷题-排序

    排序篇 # 题名 刷题 通过率 难度 56 合并区间   31.2% 中等 57 插入区间   30.4% 困难 75 颜色分类   48.6% 中等 147 对链表进行插入排序   50.7% 中等 ...

  5. LeetCode 931. 下降路径最小和 详解

    题目详情 给定一个方形整数数组 A,我们想要得到通过 A 的下降路径的最小和. 下降路径可以从第一行中的任何元素开始,并从每一行中选择一个元素.在下一行选择的元素和当前行所选元素最多相隔一列. 示例: ...

  6. ubuntu 绝望事件

    @ubuntu.com hi!大家好,早上发生了很有意思的事情 显示器分辨率(x2) 系统 2560x1440 Ubuntu 20.04.1 LTS 上面的表格是现在的环境 开机进入锁屏页面,正常显示 ...

  7. Atomic原子类

    Atomic原子类 Atomic原子类位于并发包java.util.concurrent下的java.util.concurrent.Atomic中. 1. 原子更新基本类型类 使用原子方式更新基本数 ...

  8. Golang笔记整理--第二天

    一. 标识符 Go语言标识符构成规则:开头第一个字符必须是字母或者是下划线,后面可以跟任意多个字符,数子或者下划线,并且区分大小写. 例: _aa11 //合法标识符 aa11 //合法标识符 _aa ...

  9. Android 使用Zxing报错:Channel is unrecoverably broken and will be disposed!

    使用Zxing的扫描二维码库,修改成从相册识别二维码图片,根据网上的demo修改,继而在我使用的fragment报错Channel is unrecoverably broken and will b ...

  10. Scala集合中的函数(扩展)

    1.拉链(zip) 将两个集合进行 对偶元组合并,可以使用拉链 object Demo_031 { def main(args: Array[String]): Unit = { val list1 ...