SqlSelectStarWarn
Last updated: July 14, 2025
This check warns a user when generated or raw SQL contains 'SELECT *' statements so that they can ensure selecting all fields from a table in a query is safe and necessary.
Uses
Liquibase version required | 4.19.0+ |
Scope ( |
|
Default status |
|
Default severity (exit code) |
|
Customizable settings | No (static) |
Use SqlSelectStarWarn
to warn when generated or raw SQL contains 'SELECT *' statements so that you do not have unsafe or unnecessarily broad queries selected which can lead to failing jobs and even downtime. This policy check alerts users so they can exercise more control over the fields selected in table queries.
Before you begin
Ensure that you have correctly specified your Liquibase Pro license key.
Ensure that the
--checks-scope
parameter includes the scope of this check.
Changelog checks prerequisites
--license-key=<string>
--checks-scope=<string>
Procedure
Enable
This check is enabled by default. To verify that it is currently enabled, run the checks show
command:
liquibase checks show --check-name=<string>
To run the check, use the checks run command.
liquibase checks run --check-name=<string>
Note: For flow files you'll need to run liquibase flow
to apply your changes.