Pular para o conteúdo principal

Do not use LIKE conditions without wildcards

Using a LIKE condition without a wildcard (% or _) is suspicious. A maintainer can suppose whether a wildcard is forgotten or it is meant as equality test.

Noncompliant Code Example

if (last_name like 'Smith') ...

Compliant Solution

if (last_name like 'Smith%') ...

-- or
if (last_name = 'Smith') ...