ORA-06502: PL/SQL: 数字或值错误 : 字符串缓冲区太小 错误分析

1. 问题起因

    最近在进行oracle的一些操作时,总会遇到这个错误:  ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小,错误如下:

        ORA-00604: 递归 SQL 级别 1 出现错误
        ORA-06502: PL/SQL: 数字或值错误 :  字符串缓冲区太小
        ORA-06512: 在 line 7


2.官方解释
   

 查看官方文档上的解释:

    ORA-06502: PL/SQL: numeric or value errorstring
        Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
        Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.

    官方解释是:  想存入数据库的数据(包含数据,字符串等等)不符合该字段的定义(比如长度,约束等), 举个例子,就是说你想存一个空值到非空字段,如存入3位以上的数字到NUMBER(2)字段中,等等

    官方解决方法是: 改变数据的类型,或长度,等等。


 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值