摘要:
假设如下应用:两张表——用户表TDefUser(userid,address,phone)和消费表 TAccConsume(userid,time,amount),需要查消费超过5000的用户记录。用exists:select * from TDefUserwhere exists (select 1 from TAccConsume where TDefUser.userid=TAccConsume.userid and TAccConsume.amount>5000)用in:select * from TDefUserwhere userid in (select userid fr 阅读全文