Question

In oracle I have defined column like this:

column_name varchar2(1024 char)

how should I rewrite it to informix db ?

Was it helpful?

Solution

While VARCHAR Infomix type is limited to 255 chars I would use LVARCHAR type which is limited to 32,739 bytes.

The 2nd problem is (1024 char) which means that Oracle can save 1024 chars. In encoding like UTF-8 this is not equal to 1024 bytes. For example Polish letters: ąęćŃŻŚ are saved with 2 bytes so text with 1024 Polish letters will use 2048 bytes.

Informix uses bytes length so you must know your encoding and data. For Polish text in UTF8 encoding I would translate varchar2(1024 char) into lvarchar(2048).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top