updateCountSQL <value> command

The updateCountSQL <value> command is a helper command that inspects the SQL Liquibase will run while using the updateCount <value> command.


The updateCountSQL <value> command is used to inspect the raw SQL before running the updateCount <value> command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to apply a specified number of database changes you have added to the changelog file.

Running the updateCountSQL <value> command

To run the updateCountSQL <value> command, you can specify the driver, classpath, and URL in the liquibase.properties file. For more information, see Creating and configuring a liquibase.properties file. You can also specify these in your command line.

Then run the updateCountSQL <value> command:

liquibase --changeLogFile=postgres_lbpro_master_changelog.xml updateCountSQL 2

Note: Enter the name of the changelog and the number that you want to use in place of postgres_lbpro_master_changelog.xmland 2.

updateCountSQL <value> global attributes




--changeLogFile *

Specifies the rootchangelog



Specifies the JDBC database connection URL



Specifies the database username



Specifies the database password


--outputFile **

Specifies the file path to where the updateCount SQL will be written


*Liquibase checks the changelog and any nested changelogs for the definitions of the changeset to update.

** If not specified, the updateCount SQL output goes to STDOUT.

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication.

updateCountSQL <value> command attributes

Attribute Definition Requirement


The integer indicating the number of changes you want to update