RT是这样么?create function f_test(@s varchar(10)='a')
......调用的时候 select * from f_test()怎么不行啊?

解决方案 »

  1.   


    函数调用的话.要加defalut
    dbo.f_test(default)
      

  2.   

    create function dbo.testfun 
    (
     @paraml int = 1
    )
    returns int
    as
    begin
      return @paraml+10
    end--调用 print (dbo.testfun(234))
    /*
    244
    */
    select dbo.testfun(0) result
    /*
     result 
    -------
     10
    */select dbo.testfun(default) result/*
     result
    --------
     11
    */drop function testfun
      

  3.   

    哦,学习了。那这个默认都没有意义啊我以为和oracle一样,可以不写呢?