摘要:
在sql中使用exists替换in查询时要注意使用exists时一定要关联主查询和子查询的关联不然查询会得不到相应的结果如下语句:语句一使用in查询:select realname from Users where Users.UserId in (select Gallery.Galleries.CreatorId from Gallery.Galleries group by Gallery.Galleries.CreatorId having COUNT(Gallery.Galleries.CreatorId)>1 ) Order by UserId语句二使用exists查询:se 阅读全文
posted @ 2012-11-22 12:11
MingHao_Hu
阅读(789)
评论(0)
推荐(0)
浙公网安备 33010602011771号