前两天在 njhart2003 的指导下写的function已经成功了。
http://community.csdn.net/Expert/TopicView.asp?id=4172706
当我用类似select myfun('asdf') from dual时,错误提示“无法在查询中执行Dml操作”,
不知道是为什么,记得在sql server 里好像可以这么用的。请大家再帮忙解答一下,尤其是 njhart2003 大哥!

解决方案 »

  1.   

    用pl/sql块
    declare
    v_return varchar2(20);
    begin
     v_return:=myfun('asdf');
    end;
    /
      

  2.   

    函数的返回值我是想在编程中使用的
    所以我想用select myfun('asdf') from dual
    来返回这个数,比如在ASP中。可以用楼上的这种方法吗?
      

  3.   

    这个不清楚
    可以考虑改写成带有out参数的存储过程