比如:
select AppNumber,Price,AppNumber * Price as TotalMoney from PlanList;
对于上面的查询,如果我要对TotalMoney进行查询,我就必须写成
select * from (select AppNumber,Price,AppNumber * Price as TotalMoney from PlanList) a where a.TotalMoney > 3000;
对于上面的方法,因为进行了再次查询,会不会影响查询速度了?我测试了下,好象没怎么影响!
还有,对于上面的查询还可以写成其他形式吗?