用于测试 SqlAnalyzer1.01 的21个测试用例
感慨:当年看着 https://www.cnblogs.com/heyang78/p/11451814.html 一文望洋兴叹,如今我也自己做出来了!
21.
原文=select name, cnt from (select name from tb order by name,id,age,level)
整理后文本=
select
name,
cnt
from
(
select
name
from
tb
order by
name ,
id ,
age ,
level )
20.
原文=select a from tc,(select a1,a2 from (select 1,2,3 from tc where a>2 and b>3 and c>4 group by a,b having a=2 and b=3 order by a,c) tre order by a1) tb order by a
整理后文本=
select
a
from
tc,
(
select
a1,
a2
from
(
select
1,
2,
3
from
tc
where
a>2 and
b>3 and
c>4
group by
a,
b
having
a=2 and
b=3
order by
a ,
c ) tre
order by
a1 ) tb
order by
a
19.
原文=select name, cnt from tb where age=41 and age=42 and age=43 and level>9 or salary<30000 group by name,id order by name,id,age,level
整理后文本=
select
name,
cnt
from
tb
where
age=41 and
age=42 and
age=43 and
level>9 or
salary<30000
group by
name,
id
order by
name ,
id ,
age ,
level
18.
原文=select name, cnt from tb where age=41 and age=42 and age=43 and level>9 or salary<30000 order by name,id,age,level
整理后文本=
select
name,
cnt
from
tb
where
age=41 and
age=42 and
age=43 and
level>9 or
salary<30000
order by
name ,
id ,
age ,
level
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
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
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
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
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
12.
原文=select name from tb where age=41
整理后文本=
select
name
from
tb
where
age=41
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
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
09.
原文=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
08.
原文=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
07.
原文=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
06.
原文=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
05.
原文=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
04.
原文=select name as name,birthday as b,column c from tb
整理后文本=
select
name name,
birthday b,
column c
from
tb
03.
原文=select name name,birthday b,column c from tb
整理后文本=
select
name name,
birthday b,
column c
from
tb
02.
原文=select a,b,c from tb,tc,td,tf f,tg g
整理后文本=
select
a,
b,
c
from
tb,
tc,
td,
tf f,
tg g
01.
原文=select a from b
整理后文本=
select
a
from
b
虽然还有力有未逮之处,但相对于之前用循环分支和正则表达式去硬解析好多了。
--2020年5月29日--
用于测试 SqlAnalyzer1.01 的21个测试用例的更多相关文章
- 用于测试SqlAnalyzer1.00的十七个测试用例
SqlAnalyzer功能:解析SQL语句,具体到字段,表和条件,并将其整理后输出格式化文本. 1. 原文=select a from b 整理后文本= select a from b 2. 原文=s ...
- 测试思想-测试设计 史上最详细测试用例设计实践总结 Part2
史上最详细测试用例设计实践总结 by:授客 QQ:1033553122 -------------------------接 Part1-------------------------- 方法:这里 ...
- VMware配置回环地址用于测试
我们在开发过程中,很可能需要一台服务器用于测试,在这种环境下,我们很可能需要用到vmware来构建这样的开发环境.但如果当前处在一个离线,或是不在网内的环境下,我们所搭建的环境有可能无法 ...
- Fundebug前端JavaScript插件更新至1.6.0,新增test()方法用于测试
摘要: 1.6.0新增fundebug.test()方法用于测试,请大家及时更新. 默认情况下,Fundebug 插件能够自动捕获未处理的错误(uncaught error).另外,开发者也可以通过使 ...
- linux 创建虚拟块设备,制作文件系统并挂载,用于测试lustre
1.制作块文件 3 个 [root@localhost yaoxu]# [root@localhost yaoxu]# [root@localhost yaoxu]# 2.创建回环设备 [root@l ...
- 【AMAD】splinter -- 用于测试web app的python框架
简介 动机 作用 用法 热度分析 个人评分 简介 Splinter1是一个开源工具,使用Python编写,用于测试web apps.它可以用来对浏览器实现自动化操作,比如访问URLs,和按钮等交互. ...
- (转)用C#实现实现简单的 Ping 的功能,用于测试网络是否已经连通
本文转载自:http://blog.csdn.net/xiamin/archive/2009/02/14/3889696.aspx 用C#实现实现简单的 Ping 的功能,用于测试网络是否已经联通 1 ...
- 用于测试 JsonAnalyzer2 1.01版的测试用例
14. 原文={"animal":"ca,t","color":"ora:nge","isMale" ...
- 用于测试XmlAnalyzer 1.00版的八个测试用例
XmlAnalyzer 工程目的:将XML的属性和子节点按字母序排列,然后整形输出: 08. 原文=<project xmlns="http://maven.apache.org/PO ...
随机推荐
- 前端面试 vue 部分 (3)——v-show和v-if的区别
v-if 适用于在运行时很少改变条件,不需要频繁切换条件的场景: v-show 则适用于需要非常频繁切换条件的场景. v-if 是条件渲染,如果在初始渲染时条件为假,则什么也不做--直到条件第一次变为 ...
- C#设计模式之15-解释器模式
解释器模式(Interpreter Pattern) 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/415 访问. 解释 ...
- 41. The Security Namespace
41.1 Web Application Security网络应用安全 41.1.1 <debug> 启用spring安全调试基础架构.这将提供人类可读的(多行)调试信息来监控进入安全过滤 ...
- Ng-Matero V10 正式发布!
Angular v10 在六月下旬就悄无声息的发布了,虽然 v9 的发布延期了两个月,但是 v10 并没有受影响,仍然如期而至. 相比 v9 的重量级发布,v10 并没有颠覆性的变化,主要还是 bug ...
- 实战开发,使用 Spring Session 与 Spring security 完成网站登录改造!!
上次小黑在文章中介绍了四种分布式一致性 Session 的实现方式,在这四种中最常用的就是后端集中存储方案,这样即使 web 应用重启或者扩容,Session 都没有丢失的风险. 今天我们就使用这种方 ...
- VScode+PicGo+Github+jsdelivr使用图床书写Markdown
本文讲述使用Github作为图床,VScode搭配Picgo插件书写Markdown,并使用jsdelivr进行CDN加速的配置流程. 准备阶段 首先进行以下准备工作,都很简单,不再赘述. 注册Git ...
- 算法-搜索(5)m路搜索树
动态m路搜索树即系统运行时可以动态调整保持较高搜索效率的最多m路的搜索树.以3路搜索树为例说明其关键码排序关系: const int MaxValue=; template <class T ...
- 牛客网PAT练兵场-福尔摩斯的约会
题目地址:https://www.nowcoder.com/pat/6/problem/4040 题意:模拟题,循环找相同的字母,但是注意题目的坑 /** * *作者:Ycute *时间:2019-1 ...
- Java多线程_生产者消费者模式1
生产者消费者模型 具体来讲,就是在一个系统中,存在生产者和消费者两种角色,他们通过内存缓冲区进行通信,生产者生产消费者需要的资料,消费者把资料做成产品.生产消费者模式如下图.(图片来自网络 ...
- IDEA run/debug configurations中没有配置tomcat选项
原文链接:https://blog.csdn.net/qq_41016818/article/details/80871738 原因分析 没有配置tomcat插件 解决方法如下: file->s ...