This is a collection of the most common commands I run while consulting H2 databases from the console. The variables shown between "[" and "]", should be replaced with your custom names. To make things simpler, other commands just use examples.
https://www.h2database.com/html/systemtables.html#information_schema
SELECT value FROM information_schema.settings WHERE name='info.VERSION'; http://www.h2database.com/html/grammar.html#show
SHOW TABLES;http://www.h2database.com/html/grammar.html#show
SHOW SCHEMAS;http://www.h2database.com/html/grammar.html#show
SHOW COLUMNS FROM [table];http://h2database.com/html/grammar.html#select
SELECT * FROM [table];SELECT * FROM [table] WHERE ID=455;SELECT * FROM [table] WHERE username='paul';SELECT address, username FROM [table] WHERE ID=455;SELECT * FROM [table] ORDER BY [column] DESC LIMIT 5;http://h2database.com/html/grammar.html#update
UPDATE [table] SET username='john' WHERE ID=455;http://h2database.com/html/grammar.html#delete
DELETE FROM [table] WHERE ID = 6;Delete all records from table
DELETE FROM [table]; http://h2database.com/html/grammar.html#drop_table
DROP TABLE IF EXISTS [table];http://h2database.com/html/grammar.html#drop_user
DROP USER [user];http://www.h2database.com/html/tutorial.html#console_syntax
List command history, user can easily rerun any of these commands. Show the last 20 statements.
history