How to make re-runnable of changeset with multiple insert statements

Hi Team,

We have created the sql formatted changeset in xml-based changelog file. Have few created tables script in sql file and next run just added one table script into the sql file without changing id and author and attribute runOnChange is true.
This time it’s cross verify the first statement in sql file and throws error say’s table is already placed. However, i need to execute the last added table script.
Thanks in Advance.

Changesets that have already executed should not be modified, they should remain in place as history.

runOnChange=true should only be used for “repeatable” SQL, example: “CREATE OR REPLACE PROCEDURE…”.

If you have additional changes to make, you should add new changeset(s) to your changelogs, or a new changelog, not modify existing changesets.

Hopefully this helps.

Does, liquibase supports TCL (Transaction Control Language Commands ) with begin, commit and rollback options

Yes, but those would typically not be necessary in Liquibase since each changeset is handled as a transaction, and Liquibase will handle the commit, and the DBMS will handle the rollback on a sql failure.

But if you are running a block or procedure, you could have transaction control in the block. Oracle example:

BEGIN
  IF <condition> THEN
     commit;
  ELSE
     rollback;
END;
/