Skip to content

keyword-identifier

SQLstyleno fixdefault: offsql/sqlfluff

Reports an unquoted name written like a keyword of the dialect, such as a column called year or name.

A name that is a keyword can be read as the keyword. In some positions the parser takes the keyword, in others the name, and a new version of the database may reserve the word and break the query.

To fix, rename it, or quote it.

Reported
select "A", "a", "ab c", "SELECT", date, name, a as filter from t;
sql:
lint:
rules:
keyword-identifier: warn # off (default), warn, error

Enabled by the presets: sql/sqlfluff.

Suppress one line with sudsy-disable-next-line keyword-identifier in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
sqlfluff RF04 full