Add tags

Add tags to the following comment
if もループも使っていません!
いや、ループはあるなら使いたかったけど、ストアドよく知らないし。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
--出力テーブル
drop table OUTPUT;
create table OUTPUT (
  LINE integer,
  MSG varchar(10)
);
--以下を20回実行してください
-->>>ここから
insert into OUTPUT select coalesce(max(LINE),0)+1, 'hoge' from OUTPUT;
--<<<ここまで
--今回のキモ
update OUTPUT set MSG = 'Fizz' where (LINE % 3) = 0;
update OUTPUT set MSG = 'Buzz' where (LINE % 5) = 0;
update OUTPUT set MSG = 'FizzBuzz' where (LINE % 15) = 0;
--出力
select LINE || ':' || MSG from OUTPUT order by LINE;

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...