---
title: "oracle自定义函数"
author: "HUS2013"
date: "2015-12-21T14:49:02Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2015-12-21T14:49:02Z"
id: 2265446
url: "https://hus2013.iteye.com/blog/2265446"
---

oracle 函数的创建和调用

 

函数和存储过程的区别&gt; 只有函数 可以直接 在select中使用， 这就是区别。

 

FUNCTION不建议用OUT参数，只用RETURN来返回。用OUT会令人迷惑，而且无法在SQL中调用。

 

在SQL中调用带out 参数的oracle ORA06572 错误

错误原因

ORA-06572: Function string has out arguments  
    Cause: A SQL statement references either a packaged, or a stand-alone, PL/SQL function that contains an OUT parameter in its argument list. PL/SQL functions referenced by SQL statements must not contain the OUT parameter.  
    Action: Recreate the PL/SQL function without the OUT parameter in the argument list.

 

删 函数  
drop function 函数名;