更新时间:2023-02-04 23:23:00
如果您真的想在 WHERE
中使用别名,而不是列本身,则可以使用派生表来实现:
If you really want to use alias in WHERE
, not the column itself, you can do it with derived table :
SELECT a.*
FROM
(
SELECT lmITNO AS Item_Number, lmBANO AS Lot, lmSTAS AS Status,
lmRORN AS Order_Number
FROM MVXJDTA.MILOMA
) a
WHERE a.Status = 'CCC'
....