-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_tables.sql
More file actions
75 lines (73 loc) · 997 Bytes
/
create_tables.sql
File metadata and controls
75 lines (73 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
clear screen
set serveroutput on size unlimited
drop table colors purge
/
create table colors as (
select 'red' color
from dual
union all
select 'green'
from dual
union all
select 'purple'
from dual
)
/
drop table items purge
/
create table items as (
select 1 item
from dual
union all
select 2
from dual
union all
select 3
from dual
)
/
drop table fillings purge
/
create table fillings as (
select 'outline' filling
from dual
union all
select 'striped'
from dual
union all
select 'closed'
from dual
)
/
drop table shapes purge
/
create table shapes as (
select 'oval' shape
from dual
union all
select 'diamond'
from dual
union all
select 'squiggle'
from dual
)
/
drop table cards purge
/
create table cards as
select item, filling, color, shape
from items
cross join fillings
cross join colors
cross join shapes
/
select count(*) from items
/
select count(*) from fillings
/
select count(*) from colors
/
select count(*) from shapes
/
select count(*) from cards
/