I have a stand alone H2 server up and running gathering data. For testing I want to get data out my server into a CSV file. Are there any tools for that?
Try CSVWRITE You need to just run the call (mentioned above) in the browser based client of H2 that you are most likely using. Further reading: http://www.h2database.com/html/functions.html#csvwrite. Show activity on this post. Show activity on this post.
H2 Console By default, the console view of the H2 database is disabled. Before accessing the H2 database, we must enable it by using the following property. Once we have enabled the H2 console, now we can access the H2 console in the browser by invoking the URL http://localhost:8080/h2-console.
Alternatively you can connect using the browser based H2 console. The easiest way to access the console is to double click the H2 database jar file at <installation-directory>\confluence\WEB-INF\lib\h2-x.x.x.jar .
CSVWRITE
This is perhaps all that you need:
call CSVWRITE ( 'C:/MyFolder/MyCSV.txt', 'SELECT * FROM MYTABLE' )
You need to just run the call (mentioned above) in the browser based client of H2 that you are most likely using.
Further reading: http://www.h2database.com/html/functions.html#csvwrite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With