The SELECT command does not look bad to me.
This is intended to select records where COLUMN2 has values beginning with the A uppercase letter.
The LIKE syntax is simple:
-
% is a wildcard. Serves to represent 0, 1 or N characters
-
_ is a placeholder . Serves to represent 1 and only 1 any character
By using the A% pattern, we are conditioning the results to any value that starts with A , or just A
- A
OK
- Andreia
OK
- André
OK
- arara
NÃO OK
- Monkey
NÃO OK
To ignore the case, assuming the table or field is configured to be Case Sensitive , simply reduce both to one of the cases, for example:
SELECT * FROM TABELA WHERE LOWER(COLUNA) LIKE 'a%'
The wildcard can be repeated. For example, if we want to restrict to names that contain a A in any position:
LIKE '%a%'
An email verification (rudimentary):
LIKE '%_@_%._%'
With a minimum of 3 characters:
LIKE '___%'
And so on.