用于测试 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 ...
随机推荐
- C# ASP JS引用路径不正确导致的错误
假设JS包放在根目录下的Scripts文件夹下 当前页的路径在另一个文件夹下,那么他引用JS应该:<script src="../Scripts/jquery-1.4.1.min.js ...
- java 的API及Object类
一 Java的API Java 的API(API: Application(应用) Programming(程序) Interface(接口)) Java API就是JDK中提供给我们使用的类,这些类 ...
- 2020-04-13:TCP协议本身会导致什么样的安全问题?
福哥答案2020-04-14: 洪泛攻击
- JavaScript 手写setTimeout
let setTimeout = (sec, num) => { // 初始当前时间 const now = new Date().getTime() let flag = true let c ...
- 运用cookie实现记住密码自动登陆:
苦命的程序员:只有博客才能了解我的路!!! 废话不多说:直接上代码: 1.首先在现在登录的页面上来获取cookie的所有: 2.在验证页面来设置clookie的用户名和密码还有是否是自动登录: 到此就 ...
- VulnHub靶场学习_HA: Chakravyuh
HA: Chakravyuh Vulnhub靶场 下载地址:https://www.vulnhub.com/entry/ha-chakravyuh,388/ 背景: Close your eyes a ...
- 性能测试必备知识(10)- Linux 是怎么管理内存的?
做性能测试的必备知识系列,可以看下面链接的文章哦 https://www.cnblogs.com/poloyy/category/1806772.html 内存映射 日常生活常说的内存是什么 比方说, ...
- hadoop2.6虚拟机安装
Linux环境设置/*安装Hadoop集群时要确保以下几个方面1.本机与虚拟机之间是否可以通信(Ping).如果不行检查下面 1.1本机防火墙关闭(开启情况是本机可以ping虚拟机,虚拟机不能ping ...
- linux系统相关参数查询(内存,磁盘,CPU)
1.服务器型号:dmidecode -s system-product-name 出厂日期:dmidecode -s bios-release-date 2.磁盘大小:parted -l 3.物理内存 ...
- Cirros镜像
Openstack的开发,基本都使用这个image来测试,因为他比较小,只有10M. 镜像介绍 镜像的地址: https://launchpad.net/cirros/trunk/0.3.0/+dow ...