This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Enumerate prime numbers below N using only SQL | |
-- DDL | |
create table primes( | |
value integer primary key, | |
sieved boolean not null default false | |
); | |
create index prime_sieve_idx on | |
primes(value, sieved); |