select id from table1
得到
2
3
5
,
我想对2,3,5分别用一个函数abc,
abc(2)
abc(3)
abc(5)
sql语句该怎么来写.

解决方案 »

  1.   

    select abs(id) as ID from table1
      

  2.   

    函数abc是个自定义函数,它的处理结果如下:
    select * from abc(1)
    ----------------------------------
    1 -1 总部 1
    3 1 广州 2
    2 1 东莞 2select abc(id) as ID from table1根本不行.
      

  3.   

    --abs的代码是否正确
    select dbo.abs(id) as ID from table1
      

  4.   

    select * from dbo.abs(1)
    ----------------------------------
    1 -1 总部 1
    3 1 广州 2
    2 1 东莞 2