Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在表中有一个字段,其中包含多个由 . 分隔的值;。
;
我需要按该字段对结果进行排序,但必须对每个字段的最小值进行排序。
是否可以写这样的东西:
ORDER BY MIN(SPLIT(";", FIELD)) ASC
您需要首先选择以“;”分隔的所有值 然后使用 order by 。
SELECT SUBSTR(test_column,1,INSTR(test_column,'-')-1) as test_column from TestTable order by min(test_column);