我将保持简短和简单。我想执行这个查询:
mysql> SELECT ORDER_NUM, NUM_ORDERED * QUOTED_PRICE AS TOTAL_AMOUNT
-> FROM ORDER_LINE
-> WHERE TOTAL_AMOUNT > '1000'
-> ORDER BY ORDER_NUM;
ERROR 1054 (42S22): Unknown column 'TOTAL_AMOUNT' in 'where clause'
我确定这很简单,但我不明白为什么使用别名 TOTAL_AMOUNT 不起作用。任何帮助表示赞赏!