Advertisement
Guest User

sql search name

a guest
Feb 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. SELECT u.*
  2. FROM user u
  3. WHERE 'Kenneth Varg' LIKE Concat(Concat('%',u.first_name),'%')
  4. OR 'Kenneth Varg' LIKE Concat(Concat('%',u.last_name),'%');
  5.  
  6. SELECT *
  7. FROM user
  8. WHERE first_name LIKE '%Ken%'
  9. OR last_name LIKE '%Ken%';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement