ONLY DO WHAT ONLY YOU CAN DO

こけたら立ちなはれ 立ったら歩きなはれ

2012-04-03から1日間の記事一覧

SQL で FizzBuzz

with a as ( select 0 as n from dual union all select 1 from dual ) select case when mod(n, 3) = 0 and mod(n, 5) = 0 then 'FizzBuzz' when mod(n, 3) = 0 then 'Fizz' when mod(n, 5) = 0 then 'Buzz' else to_char(n) end from ( select a01.n + a02…