感慨:当年看着 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日--

最新文章

  1. 转: 解决Github访问超慢问题
  2. HDU4930 Fighting the Landlords 模拟
  3. noi 9271 奶牛散步
  4. 天嵌E8卡片电脑USBWIFI驱动linux移植
  5. Get function name by address in Linux
  6. leetcode@ [295]Find Median from Data Stream
  7. HTML不常用元素:optgroup
  8. [linux]ubuntu apt-get安装软件失败
  9. .NET Core版本七牛云SDK使用
  10. UiAutomator2.0 - 控件实现点击操作原理
  11. Module的加载实现
  12. Vue.component注意事项
  13. 通过htaccess文件配置多个一级域名指向根目录的子文件夹
  14. uva10780
  15. 鼠标移上去触动hover致使div向上移动几个相素(动画transition轻轻的移动)
  16. input 与raw_input的区别
  17. Oracle中如何写存储过程
  18. Angular 快速学习笔记(1) -- 官方示例要点
  19. Java 访问控制关键字
  20. WEB入门二 表格和表单

热门文章

  1. C语言学习笔记之进制之间的转换
  2. CSS漂亮盒子(下)
  3. Integer.valueOf源码分析
  4. super与this的区别,更进一步的区别!——Java学习
  5. mysql基础测试题
  6. ubuntu开发机所需工具,做个记录,不断补充
  7. Centos7修改用户名
  8. 关于H标签 DL DT DD标签的一个小故事
  9. 数据中台实战(一):以B2B电商亿订为例,谈谈产品经理视角下的数据埋点
  10. curl报错60的问题