Hello people!
We have been working with Liquibase in Oracle for a few months now. Usually it’s simple stuff that we already have a handle on but recently we’ve run into a little problem trying to get off the beaten path.
We are trying to create a sequence and then advance it to the maximum value of a certain table. We wanted to avoid using PL/SQL so we are trying to do something like this:
--liquibase formatted sql
--changeset author:1
CREATE SEQUENCE my_sequence START WITH 1 INCREMENT BY 1;
--changeset author:2
SELECT my_sequence.NEXTVAL FROM dual CONNECT BY LEVEL <= (SELECT MAX(field) FROM my_table);
We know that this approach is not the most optimal in terms of performance but we don’t expect the number of rows returned to be very high either. The sql works correctly but in the context of liquibase we observe that the sequence only advances 10 positions. Is there any limitation that we have not seen?,would it be better to use PL/SQL?
Thank you very much in advance for your comments.
Best regards