GoLand 2020.1 Help

Code Inspections in SQL

This topic lists all GoLand code inspections available in SQL.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the Settings/Preferences Ctrl+Alt+S.

InspectionDescriptionDefault Severity
Adding not null column without default value

Necessary to specify the default value for the new column with not null constraint.

Warning Warning
Aggregate-related problems

This inspection reports incorrect or suspicious usages of SQL aggregate functions.

Warning Warning
Ambiguous reference

This inspection checks that column reference resolves to a single column.

Warning Warning
Auto-increment duplicate

This inspection checks auto_increment duplicates in MySQL, MS SQL and Db2 dialects. A table in those dialects can contain only one auto-incrementing field.

Warning Warning
Check using clause columns

This inspection checks that columns inside using clause exist in both tables.

Warning Warning
Column should be in group by clause

This inspection checks that column should be in group by clause or inside aggregate function call.

Warning Warning
Constant condition

Reports those conditions in the where or join clauses that are always true or false .

Warning Warning
Current console schema introspected

Warns if current session's schema/database is not introspected.

Warning Warning
Delete or update statement without where clauses

Reports usages of 'delete' or 'update' statements without any 'where' clauses. When used without 'where' clauses, 'delete' drops all the data from the table, and 'update' overwrites values for all table rows.

Warning Warning
Deprecated type

Since 8.0 the 'long' type is deprecated and not recommended to use (because API for this type doesn't utilize character streams but transfer whole values each time). In Oracle, do not create a table with LONG columns. Use LOB columns (CLOB, NCLOB, BLOB) instead. LONG columns are supported only for backward compatibility.

Warning Warning
Duplicating column name in SELECT

This inspection finds duplicating alias names for columns in SELECT output list.

Warning Warning
Each derived table should have alias

This inspection checks that each derived table should have own alias.

Warning Warning
Erroneous usages of ORDER BY in SQL Server queries

This inspection reports erroneous usages of ORDER BY clauses in SQL Server queries

Error Error
Excessively long identifiers

This inspection reports identifiers which are considered too long in a particular DBMS

Error Error
Function signature

This inspection performs function signature check.

Warning Warning
Identifier should be quoted

This inspection performs SQL identifier names check.

Warning Warning
Ill-formed date/time literals

This inspection reports errors in SQL date/time literals.

Warning Warning
Illegal cursor state

This inspection reports illegal cursor states inside SQL routines.

Warning Warning
Implicit string truncation

Detects variable assignments which involve implicit string truncation

Warning Warning
Index is dependent on column

This inspection checks dropping indexed columns in MS SQL and Sybase SQL Server.

Warning Warning
Insert NULL into NOT NULL column

This inspection reports insertions of NULL into NOT NULL columns.

Warning Warning
Insertion into generated columns

This inspection reports INSERT statements which assign values to generated columns

Warning Warning
LOAD statement path

Reports paths started with the tilde character in the LOAD statement

Warning Warning
Misleading references

This inspection reports potentially misleading references in SQL code

Warning Warning
Missing column aliases

This inspection reports queries without explicit aliases for output expressions other than column references.

Disabled
Missing return statement

This inspection reports functions with missing return statements.

Error Error
Multiple row limiting/offset clauses in queries

This inspection reports queries with multiple row limiting/offset clauses.

Warning Warning
MySQL: Syntax

Provides diagnostic of MySQL parser idiosyncrasies.

Warning Warning
Named arguments should be used

This inspection reports routine calls without named arguments

Disabled
No data sources configured

Prompts one to create a data source if there is none.

Warning Warning
Null comparison

This inspection checks suspicious comparisons with NULL.

Warning Warning
Postgres: Select from procedure call

Select from dblink or function that returns record require typed alias list. Scalar functions do not require alias and forbid typed alias lists completely.

Warning Warning
Redundant ELSE NULL clause

This inspection reports redundant ELSE NULL clauses in CASE expressions.

Warning Warning
Redundant alias expressions

This inspection reports redundant alias expressions

Warning Warning
Redundant code in COALESCE call

This inspection reports redundant code inside COALESCE calls.

Warning Warning
Redundant ordering direction

This inspection reports redundant ordering direction in ORDER BY clauses.

Warning Warning
Redundant row limiting in queries

This inspection reports redundant row limiting in queries.

Warning Warning
SQL dialect detection

Detects the best matching SQL dialect for files in <Generic> dialect.

Warning Warning
SQL error handling

Highlights invalid usages of constructs that handle exceptions in SQL routines

Error Error
SQL source modification detection

Detects that database sources have changed.

Warning Warning
Statement with side effects

This inspection only runs during a read-only connection and reports statements that may lead to modification of the database.

Warning Warning
Suspicious code in triggers

This inspection reports incorrect usages of transition table variables in triggers

Warning Warning
Suspicious or incorrect usages of built-in functions

This inspection reports suspicious or incorrect use cases of SQL Server built-in functions

Warning Warning
Types compatibility

This inspection performs type-related check.

Warning Warning
Unicode usage in SQL

This inspection reports string literals with national characters but lacking N prefix.

Warning Warning
Unreachable code

This inspection reports unreachable statements inside SQL routines.

Warning Warning
Unresolved reference

This inspection performs unresolved SQL references check.

Error Error
Unsafe 'join' clause in 'delete' statement

Reports usages of 'join' clause inside a 'delete' statement where no 'on' or 'where' checks are present. Without conditional checks on 'join', 'delete' drops contents of the entire table.

Warning Warning
Unused common table expression

This inspection reports unused common table expression inside SQL.

Warning Warning
Unused subquery item

This inspection reports unused subquery items: columns and aliases that are not referenced in the outer query expression

Warning Warning
Unused variable

This inspection performs unused argument/variable check.

Warning Warning
Usages of GOTO statements

This inspection reports usages of a GOTO statement

Disabled
Use of transaction management statements in triggers

This inspection reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies

Warning Warning
Using CASE instead of COALESCE function and vice versa

This inspection reports CASE expressions which can be replaced with COALESCE calls or vice versa depending on the chosen preferences

Warning Warning
Using CASE instead of conditional function and vice versa

This inspection reports CASE expressions which can be replaced with IF-like function calls or vice versa depending on the chosen preferences

Warning Warning
VALUES clause cardinality

This inspection checks that the number of VALUES (...) parameters matches target table column list size.

Warning Warning
Last modified: 18 July 2020