Skip to content
Advertisement

Oracle | Update Long type | Error: Illegal use of LONG datatype

How to rectify issue on UPDATE?

Following is related data and error

Following is table structure:

Not able to find answers in related questions. Not sure whether i need to modify table datatype but when i try to modify it says remove data first.

Advertisement

Answer

if ID is Primary Key – it should not be LONG.

The LONG column has limitations – You can use LONG columns in SELECT lists, SET clauses of UPDATE statements, and VALUES clauses of INSERT statements.

there is larger list where it cannot be used! including

  • LONG columns cannot appear in WHERE clauses or in integrity constraints (except that they can appear in NULL and NOT NULL constraints).

see for list https://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements001.htm#SQLRF00201
https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1831

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement