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.
この質問は MySQL に関するものです。
1 つの行から列を合計できるかどうかを知りたいです。たとえば、値ごとに 1 つの列 (5 に 1 つ、21 に 1 つ、10 に 1 つ) ではなく、"5 21 10" と書かれている列があります。 )、この列で何らかの方法で SUM を使用したいのですが、36 を返す必要があります。
それが可能だ ?はいの場合、どのように?
ありがとう。
列名がわかっている場合は、それらの合計を選択してください。
SELECT col1 + col2 + col3 FROM MyTable;