Searching 2 fields at the same time
Posted
by donpal
on Stack Overflow
See other posts from Stack Overflow
or by donpal
Published on 2010-05-24T09:57:04Z
Indexed on
2010/05/24
10:01 UTC
Read the original article
Hit count: 416
I have a table of first and last names
firstname lastname
--------- ---------
Joe Robertson
Sally Robert
Jim Green
Sandra Jordan
I'm trying to search this table based on an input that consists of the full name. For example:
input: Joe Robert
I thought about using
SELECT * FROM tablename WHERE firstname LIKE
BUT the table stores the first and last name separately, so I'm not sure how to do the search in this case
© Stack Overflow or respective owner