We are using liquibase to create and manage tables in Oracle. I have an issue while creating a sequence with max value of ID column from a table. In liquibase I have tried the following.
<sql>Create Sequence id_sequence starts with (Select max(id) from tableName)</sql>
It shows an Invalid number error. I think it is due to select query does not return a number. I also tried to number and got the same error for the following
<sql>Create Sequence id_sequence starts with TO_NUMBER((Select max(id) from tableName))</sql>
Is there a way to avoid this error with liquibase. I don't find a solution based for liquibase. So I asked here