SqlSelectStarWarn

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

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 quality check alerts users so they can exercise more control over the fields selected in table queries.

Run the SqlSelectStarWarn check

Enable the SqlSelectStarWarn check by running the following command in the CLI:

liquibase checks enable --check-name=SqlSelectStarWarn
Short Name Scope Enabled Severity Customization Description
SqlSelectStarWarn changelog

true

Default value: 0

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

<none>

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.