SQL Server equivalent to Oracle LEAST?

前端 未结 2 1774
我在风中等你
我在风中等你 2020-12-07 04:40

I\'ve been looking for a good equivalent to the Oracle LEAST function.

I\'m hoping to implement a user defined function that does about 10 fairly complex calculation

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 05:27

    mayby this query could help:

     SELECT  min(c1)  
     from ( 
          select expression1 as c1  
          union all
          select expression2 as c1 
          union all 
          select expression3 as c1
     )
    

提交回复
热议问题