2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
13
Task/Even-or-odd/SQL/even-or-odd.sql
Normal file
13
Task/Even-or-odd/SQL/even-or-odd.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- Setup a table with some integers
|
||||
create table ints(int integer);
|
||||
insert into ints values (-1);
|
||||
insert into ints values (0);
|
||||
insert into ints values (1);
|
||||
insert into ints values (2);
|
||||
|
||||
-- Are they even or odd?
|
||||
select
|
||||
int,
|
||||
case mod(int, 2) when 0 then 'Even' else 'Odd' end
|
||||
from
|
||||
ints;
|
||||
Loading…
Add table
Add a link
Reference in a new issue