---
title: "ORA_01403 NO_DATA_FOUND"
author: "ben8804"
date: "2010-12-05T15:40:45Z"
tags: ["F#", "Oracle"]
categories: ["数据库"]
slug: "ora-01403-no-data-found"
draft: false
lastmod: "2010-12-05T15:40:45Z"
id: 833853
url: "https://ben8804.iteye.com/blog/833853"
---

Oracle在存储过程中使用select f int v\_f from t\_name where t\_id='1';

报NO\_DATA\_FOUND异常

------解决方法--------------------------------------------------------  
select f int v\_f from t\_name where t\_id='1'  
exception  
when no\_data\_found then  
v\_f  := '0';

加上异常处理机制NO\_DATA\_FOUND

------解决方法--------------------------------------------------------  
select count(\*) into v\_temp from t\_name where t\_id='1'  
if v\_temp &lt;&gt; 0 then  
select f into v\_f from t\_name where t\_id='1'  
end if;  
这也是一种处理方法