How can I select all ids with the pattern lastname.firstname
I am looking to select ids that are backwards from some 开发者_StackOverflowstandards we have outlined.
What I would like to do is this:
SELECT iid FROM login WHERE iid LIKE lastname'.%'
In theory this should catch everyone where there id is lastname.firstname instead of firstname.lastname. Either way any suggestions would be awesome.
Thank you.
How about SELECT iid FROM login WHERE iid != CONCAT(firstname,'.',lastname)
:)
Or SELECT iid FROM login WHERE iid LIKE CONCAT(lastname,'.%')
精彩评论