cyborg
cyborg

Reputation: 5748

HSQL - dropping/creating types

This should be simple but have yet to find an answer.

I want to create a type A only if it does not already exists and/or drop the type if it already exists and recreate it at the startup of my HSQL database.

Now I know the drop and create commands:

CREATE TYPE myType as VARCHAR(100)
DROP TYPE myType

However I have yet to discern how to check for the existence of the type.

Upvotes: 1

Views: 629

Answers (1)

cyborg
cyborg

Reputation: 5748

Actually turned out to be very simple:

DROP TYPE myType IF EXISTS

Upvotes: 3

Related Questions