select max(1,2)是错误的,呵呵。看帮助也没有明白,求正确写法!

解决方案 »

  1.   

    declare @t table(a int)
    insert @t values(1)
    insert @t values(2)
    select max(a) from @t
      

  2.   

    select case when 1>2 then 1 else 2 end as max12
      

  3.   


    declare @t table(col int)
    insert @t select 1
    insert @t select 2
    select max(col) from @t
      

  4.   

    max() 只需要一個參數, 你卻給了兩個
      

  5.   

    select case when 1>2 then 1 else 2 end as max12呵呵 应该这么写 我的
    头一次 用这个 函数 ,和自己想的不一样。
    谢谢!!