Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
25
Task/Hash-join/Run-BASIC/hash-join.basic
Normal file
25
Task/Hash-join/Run-BASIC/hash-join.basic
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
sqliteconnect #mem, ":memory:"
|
||||
|
||||
#mem execute("CREATE TABLE t_age(age,name)")
|
||||
#mem execute("CREATE TABLE t_name(name,nemesis)")
|
||||
|
||||
#mem execute("INSERT INTO t_age VALUES(27,'Jonah')")
|
||||
#mem execute("INSERT INTO t_age VALUES(18,'Alan')")
|
||||
#mem execute("INSERT INTO t_age VALUES(28,'Glory')")
|
||||
#mem execute("INSERT INTO t_age VALUES(18,'Popeye')")
|
||||
#mem execute("INSERT INTO t_age VALUES(28,'Alan')")
|
||||
|
||||
#mem execute("INSERT INTO t_name VALUES('Jonah','Whales')")
|
||||
#mem execute("INSERT INTO t_name VALUES('Jonah','Spiders')")
|
||||
#mem execute("INSERT INTO t_name VALUES('Alan','Ghosts')")
|
||||
#mem execute("INSERT INTO t_name VALUES('Alan','Zombies')")
|
||||
#mem execute("INSERT INTO t_name VALUES('Glory','Buffy')")
|
||||
|
||||
#mem execute("SELECT *,t_age.name FROM t_age LEFT JOIN t_name ON t_name.name = t_age.name")
|
||||
WHILE #mem hasanswer()
|
||||
#row = #mem #nextrow()
|
||||
age = #row age()
|
||||
name$ = #row name$()
|
||||
nemesis$ = #row nemesis$()
|
||||
print age;" ";name$;" ";nemesis$
|
||||
WEND
|
||||
Loading…
Add table
Add a link
Reference in a new issue