疑问? 怎样在order by里使用子查询时,同时查询出Income-OutCome字段的值。

    1. SELECT Name,Sex,WorkYear,InCome-OutCome
    2. FROM employees,salary
    3. WHERE salary.EmployeeID=employees.EmployeeID
    4. ORDER BY
    5. InCome-OutCome
    6. DESC
    7. -- 等价于
    8. SELECT Name,Sex,WorkYear
    9. FROM employees
    10. ORDER BY
    11. (SELECT InCome-OutCome
    12. FROM salary
    13. WHERE salary.EmployeeID=employees.EmployeeID)DESC