Other databases (e.g. PostgreSQL, H2) support an optional "IF NOT EXISTS" clause on some (all?) CREATE [ object type ] DDL statements. This would be a useful and probably simple feature addition.
HSQLDB already supports IF EXISTS on some DROP statements, so this would be the inverse feature.
HSQLDB supports IF NOT EXISTS for CREATE TABLE and CREATE SEQUENCE. Support might be added for more object types.
CREATE TABLE IF NOT EXISTS <table name> ...
Last edit: Fred Toussi 2016-01-23
Thanks for the feedback.
Indeed, I've tried it later on with CREATE TABLE and it does work (although, it is missing from the docs: http://www.hsqldb.org/doc/2.0/guide/databaseobjects-chapt.html#dbc_table_creation)
I was particularly looking for CREATE VIEW IF NOT EXISTS and CREATE INDEX IF NOT EXISTS
OK Lukas, I will add them.
Thank you very much! :)
Support for CREATE VIEW, CREATE INDEX added. Also ALTER TABLE <name> ADD CONSTRAINT [IF NOT EXISTS] <constraint name=""> is supported. Committed to SVN for 2.3.4