Created
February 9, 2018 09:24
-
-
Save tori3852/22098f70f5e67b0c2f21e14d3801f1d4 to your computer and use it in GitHub Desktop.
Run h2 locally
This file contains hidden or 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
mvn dependency:get -Dartifact='com.h2database:h2:1.4.196' | |
java -jar ~/.m2/repository/com/h2database/h2/1.4.196/h2-1.4.196.jar & | |
java -cp ~/.m2/repository/com/h2database/h2/1.4.196/h2-1.4.196.jar org.h2.tools.RunScript -url jdbc:h2:~/test -user sa -showResults -script <(cat <<EOF | |
WITH RECURSIVE fibonacci (n, fib_n, next_fib_n) AS | |
( | |
SELECT 1, 0, 1 | |
UNION ALL | |
SELECT n + 1, next_fib_n, fib_n + next_fib_n | |
FROM fibonacci WHERE n < 10 | |
) | |
SELECT * FROM fibonacci; | |
EOF | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment