摘要: 有两张表:testA和testB:testA testB 有如下三条sql语句,他们的结果是否一样呢?1、selecttestA.A form testA where testA.A in (select B from testB);2、select testA.A select * from testA where exists (select B from testB);3、selecttestA.A from testA,testB where testA.A= testB.B;查询结果:1、1,22、1,2,33、1,1,2其区别在于:1、in和exists在不考虑效... 阅读全文
posted @ 2012-07-30 14:26 Vincent.Pei 阅读(199) 评论(0) 推荐(0) 编辑