摘要: 假设如下应用:两张表——用户表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 阅读全文
posted @ 2012-02-08 16:43 一直在等 阅读(808) 评论(0) 推荐(0) 编辑