在我的sql表中,当我使用此查询选择数据时,
SELECT * FROM agreement_id, hierarchy_id, customer_no FROM rebate_agreement
WHERE Customer_no = 'Kap-ST';
当我使用上面的查询时,它过滤记录如下,
agrement_id | hierarchy_id | customer_no |
---|---|---|
KAPA2 | KHIE1 | Kap ST|
KAPA3 | KHIE1 | Kap ST |
KAPA4 | * | Kap ST |
当hierarchy_id='*'然后1其他2结束时,按案例排序,agreement_id