Is it possible to run an SQL script that doesn't return a resultSet or is not an INSERT or UPDATE type of script?
I'm trying the following:
Query q = entityManager.createNativeQuery("DECLARE @max int;\n" +
"SELECT @max = MAX(customer_number)+1\n" +
"FROM organisation\n" +
"\n" +
"exec('ALTER SEQUENCE organisation_customer_number_seq RESTART WITH ' + @max)");
...but of course that just creates the query, how to execute it? I can only find getters for different types of resultSets and executeUpdate method for Query. How to just run that query I created above to restart a sequence?