Greatest value of multiple columns with column name?(具有列名的多列的最大值?)
问题描述
关于如何从多列中返回最大值以及列名,我已经探索了许多问题和答案.但我还没有解决问题这里在这个问题中将解释:
I have explored many questions and answers regarding how to return the greatest values from multiple columns along with column name. But I have not solved the problem here in this question will explain:
多列的SQL MAX?
但我不知道如何找出具有最大价值的列名?有什么想法吗?
But I don't know how to figure out the column name having greatest value? Any ideas?
推荐答案
您可以使用 GREATEST 函数在所有列中找到最大值:
You can use GREATEST function to find the maximum value among all columns:
这篇关于具有列名的多列的最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!