I can use CREATE TABLE IF NOT EXISTS
to create a table only if it doesn't exist.
How can i do the same for CREATE INDEX..
to only create it if it doesn't exist?
You can do it as follows,
CREATE INDEX IF NOT EXISTS NEW_INDEX_NAME ON TABLE_NAME;
You can follow link aswell, http://www.h2database.com/html/grammar.html#create_index
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With