How to create a table in a query?

I’m using Libreoffice base. I want to crate a table using a query, but it doesn’t seem to work. I type in the code and press ‘Run SQL command directly’ and this pops up:
The data content could not be loaded.
Statement does not generate a result set
It’s HSQLDB embedded, if that tells you anything. This is the code:
CREATE TABLE Profesori (
prof_ID int NOT NULL PRIMARY KEY,
prezime varchar(30),
ime varchar(15),
predmet int
);

menu:Tools>SQL…

I can not use that. It’s a school project.

But Tools → SQL is the only possibility to execute other codes than queries. The query-editor has only be created for code, which will generate a result. It isn’t created for INSERT, UPDATE, CREATE, DELETE.

There is no other way when using LibreOffice Base. The statement issued in the SQL window is directly sent to the underlying database engine, add ing a database table “behind the scenes”. You need to select the tables section and call menu:View>Refresh Tables in order to make the changes visible in Base.

You can execute any SQL statement with a macro.
Pseudo-code:

   statement = connection.createStatement()
   statement.execute("create table ...")

Read LibreOffice: XStatement Interface Reference
The execute() method returns “multiple” results. It is also valid for zero results.

Sure, but let’s agree it’s not a practical method one would recommend vis-à-vis the SQL Window.
Even more for

one can infer about DBs.