开发者

How can I select all ids with the pattern lastname.firstname

开发者 https://www.devze.com 2023-01-13 07:15 出处:网络
I am looking to select ids that are backwards from some 开发者_StackOverflowstandards we have outlined.

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,'.%')

0

精彩评论

暂无评论...
验证码 换一张
取 消