复制select decode(t.organtypecode,数据 D, t.parent, S, t.parent, t.id) from A_ORGAN t where t.parent = 35 DB2 SQL: select case x.organtypecode when D then x.parent when S then x.parent else x.id end from a_Organ x where x.parent = 35; 1.2.3.4.5.6.7.8.9.10.11.12.13.14.