我想进行类似的批处理查询:
SELECT name FROM user
WHERE uid IN (userID1, userID2, userID3 ...) and name LIKE '%searchParameter%'
这甚至可能吗?我怎样才能做到这一点?
答案 0 :(得分:0)
是的,有可能
SELECT name, uid from user WHERE uid in (SELECT uid2 FROM friend WHERE uid1=me()) and strpos(lower(name),lower('Zuck')) >= 0
在上面的案例中,我正在查询包含字母zuck
的朋友的姓名