ORA-01461: can bind a LONG value only for insert into a LONG column-Occurs when querying

前端 未结 15 1758
野的像风
野的像风 2020-11-30 02:44

When I try to query objects, I end up with following error:

ORA-01461: can bind a LONG value only for insert into a LONG column

Could someo

15条回答
  •  攒了一身酷
    2020-11-30 03:13

    It can also happen with varchar2 columns. This is pretty reproducible with PreparedStatements through JDBC by simply

    1. creating a table with a column of varchar2 (20 or any arbitrary length) and
    2. inserting into the above table with a row containing more than 20 characters

    So as above said it can be wrong with types, or column width exceeded.

    Also note that as varchar2 allows 4k chars max, the real limit will be 2k for double byte chars

    Hope this helps

提交回复
热议问题