H2 Shell is a command line database tool which can be used for any of the database sql operation. 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/~/test1Users can either use H2 shell or web console. H2 web console will allow you to access sql database using a browser. One of my colleague has written nice blog entry on getting started with H2 database and using the H2 web console.
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>
0 comments:
Post a Comment