运用自连接同子查询之间有什么区别?请大家给点意见
SELECT R1.readerid,R1.readername,R1.unit,R1.bookcount
FROM ReaderInfo AS R1,ReaderInfo AS R2
WHERE R2.readerid=9704
AND R1.bookcount>R2.bookcount --连接关系
ORDER BY R1.bookcount
SELECT readerid,readername,unit,bookcount
FROM ReaderInfo
WHERE bookcount>(SELECT bookcount --使用子查询
FROM ReaderInfo
WHERE readerid=9704)
ORDER BY bookcount