获取这 4个价格的最小值和最大值

金沙网址 1

金沙网址, 金沙网址 2

SELECT
(
SELECT min(minPrice)
FROM
(
VALUES
(IIF(MarketSingleImagetextPrice=0,null,MarketSingleImagetextPrice)),
(IIF(MarketMoreGraphicOnePrice=0,null,MarketMoreGraphicOnePrice)),
(IIF(MarketMoreGraphicTwoPrice=0,null,MarketMoreGraphicTwoPrice)),
(IIF(MarketMoreGraphicThreePrice=0,null,MarketMoreGraphicThreePrice))
) AS #temp(minPrice)
) AS MinIboPrice
FROM YX_WeChatFlowMode WHERE ShapeID=1 AND FlowID = 1656

时不时遇上获取数据表中多个列的最小值和最大值,比如:

赢得那 伍个价格的最小值和最大值:

 

 

相关文章