-4

How can you make from the * a wildcard so when i search for a user i type in like

Firstname: R* Lastname: *

and it will look for users where the firstname starts with R or

Firstname: * Lastname: R*

and it will look for user where the lastname starts with R.

halfer
  • 19,824
  • 17
  • 99
  • 186

2 Answers2

1

You don't need * rather you need to do like R% and that will get you all lastname starts with R letter

select * from table1
where Lastname like 'R%'
Rahul
  • 76,197
  • 13
  • 71
  • 125
  • @user3625270, This is the correct way of achieving what you are looking for. don't forget to accept the answer if it helped. – Rahul May 14 '14 at 18:49
0

Try:

SELECT * FROM users WHERE username LIKE 'R%';
Anwar
  • 165
  • 1
  • 4
  • 11