---
title: "oracle中函数和存储过程的区别"
author: "sun_xyun"
date: "2010-04-26T13:15:05Z"
tags: ["C", "C#", "C++", "Oracle", "SQL"]
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2010-04-26T13:15:05Z"
id: 653196
url: "https://sun-xyun.iteye.com/blog/653196"
---

一、oracle中函数和存储过程的区别？
A:函数必须有返回值，而过程没有返回值。
B:函数可以单独执行，而过程必须通过execute执行。
C:函数可以嵌入到sql中执行，而过程不行。
其实我们可以将比较复杂的查询写成函数，然后到存储过程中调用这些函数。 
二、postgre 中只有函数