A5:SQL Mk-2でSQL整形
※もしくは「Ctrl+Q」
整形対象SQL
select distinct tb1.id ,tb1.name ,tb1.type ,case
tb1.type when '1' then 'typeA' when '2' then
'typeB' else 'type0' end as tp_namefrom TB_ONE
tb1 inner join ( select tb2.id
,tb2.point ,tb2.category from TB_TWO
tb2 where tb2.category > 'X' ) tb2_x
on tb1.id = tb2.idwhere tb2.point >= 100 and (tb1.type
= 1 or tb1.type = 2) union select * from
(select * from TB_OLD)