MySQL query statement processing results - enumeration fields

[size=medium]
语法:CASE [COLUMN_] WHEN [situation] THEN .... END AS [NEW_NAME]
SELECT o.WMIO_CODE,
CASE o.WMIO_TYPE
WHEN 0 THEN 'Return in storage'
WHEN 1 THEN 'Restocking'
WHEN 2 THEN 'Transfer into warehouse' END AS WMIO_TYPE,
o.WMIO_CUSTOMER_NAME,
o.WMIO_RECEIPT_NUM,
o.WMIO_REJECT_NUM,
o.WMIO_ANALYSISOR,
o.WMIO_ANALYSIS_TIME
FROM wm_into_order_10000 o WHERE o.WMIO_CODE = 'I10000025160923002'
[/size]

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326599976&siteId=291194637