标签:ESS tor mysql基础 concat_ws tran group by 基础 pre span
SELECT GROUP_CONCAT( CONCAT_WS( ‘---‘, TRANSIT_PORT_EN, IF ( TRANSIT_PORT_CODE IS NULL OR TRIM(TRANSIT_PORT_CODE) = ‘‘, ‘无‘, TRANSIT_PORT_CODE ), IF ( TRANSIT_ROUTE_CODE IS NULL OR TRIM(TRANSIT_ROUTE_CODE) = ‘‘, ‘无‘, TRANSIT_ROUTE_CODE ), IF ( TRANSIT_VESSEL IS NULL OR TRIM(TRANSIT_VESSEL) = ‘‘, ‘无‘, TRANSIT_VESSEL ), IF ( TRANSIT_VOYAGE IS NULL OR TRIM(TRANSIT_VOYAGE) = ‘‘, ‘无‘, TRANSIT_VOYAGE ) ) ORDER BY TRANSIT_SORT SEPARATOR ‘>>>‘ )
---- 不必须要 加 group by
标签:ESS tor mysql基础 concat_ws tran group by 基础 pre span
原文地址:https://www.cnblogs.com/angdh/p/12012682.html