更新时间:2022-11-17 17:00:38
不确定这是否是您想要的,但是您可以通过一个查询来查看 vipclients 中是否有任何匹配的记录.
Not sure if this is what you want, but you could do it in one query to see if there is any matching records in vipclients.
select a.*,b.* ,CASE WHEN b.clientid IS NOT NULL
THEN 'FOUND'
ELSE 'NOT FOUND'
END AS vipexists
from clients a left outer join vipclients b on a.clientid=b.clientid