刚入手公司项目,需要添加一个功能,用到了SQL的case when以及concat SELECT eve.cc, eve.sc, case concat(cc,sc) ' THEN '' ' THEN '得意先' ' THEN '仕入先' ' THEN '得意先/仕入先' ELSE '' END as client_supplier_class FROM ( SELECT bd0.id, bd0.created, bd0.creator, bd0.modified, bd0.modifier,…