H2 Shell is a command-line database tool which can be used for any of the database SQL operations. To run the H2 shell go to the bin directory of your H2 installation and run the following.
java -cp h2*.jar org.h2.tools.Shell
Once you run the tool it will ask some connection details.
URL jdbc:h2:tcp://localhost/~/test1 Driver org.h2.Driver User sa Password sa Connected Commands are case insensitive; SQL statements end with ';' help or ? Display this help list Toggle result list mode maxwidth Set maximum column width (default is 100) show List all tables describe Describe a table quit or exit Close the connection and exit sql>Users can either use H2 shell or web console. H2 web console will allow you to access SQL database using a browser. One of my colleagues has written a nice blog entries on getting started with H2 database and using the H2 web console.
1 comment:
Thank you, that was exactly what I wanted to know!
Post a Comment