Skip to content

Using 'LIKE' in query (UsingLikeInQuery)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL Major No 10 sql
unpredictable

Description

In most algorithms, it is possible to do without using the operator LIKE, and in the rest, you must use it carefully. The result in some situations can be very different from the expected, for example, when using different DBMS.

Examples

Correct

Property LIKE "123%"

Incorrect:

Property LIKE Table.Template

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:UsingLikeInQuery-off
// BSLLS:UsingLikeInQuery-on

Parameter for config

"UsingLikeInQuery": false