Create table and index in one script

Keith Squier <[email protected]> Thu, 12 Jan 2017 17:35:30 -0600
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <CAPsHEeEa9oZhE_wAqfHKrtMswjL0ob47zGdBdzgyBw=JJ1Tqzg@mail.gmail.com>
I am having difficulty creating tables and indexes all in one script. A
simple example is below.

CREATE TABLE A (
   id UUID NOT NULL,
   datetime TIMESTAMP NOT NULL,
   PRIMARY KEY (id));

CREATE INDEX a_datetime_idx ON A (datetime);

When I run both statements in a single transaction, I get errors that the
table is not found. If I run them in separate transactions, everything
works. Is it not possible to create tables and their indexes all in one
transaction?

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user