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.
エントリを 1 列で並べ替える方法 (名前付きとしましょうcolumn13)。column13最初に「val」、次に「aaa」、「ccc」のエントリが必要です。などは使えませんGROUP BY column13 ASC。3つのクエリを書かずにそれを行うことは可能ですか?
column13
GROUP BY column13 ASC
FIELD()MySQL で利用可能な構造を使用します。
FIELD()
SELECT stuff FROM table WHERE condition ORDER BY FIELD(column13, 'val', 'aaa', 'ccc')