Reputation: 1
I need to find all records that contain a middle initial in the following format:
N Jones
S Smith
T Thompson
SELECT *
FROM USERS
WHERE Last_Name LIKE '% %'
This query returns
JE Smith
TE Jones
I only want to include rows that contain a single character at the beginning of the string followed by a space.
Upvotes: 0
Views: 48
Reputation: 88996
I only want to include rows that contain a single character at the beginning of the string followed by a space.
Then don't use a multi-character wildcard (%) use a single character wildcard (_).
Upvotes: 1