1

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.

1 Answer 1

3

Actually turned out to be very simple:

DROP TYPE myType IF EXISTS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.