Question

I have defined an VARCHAR2(2000 CHAR) field in the database. Often, we run into issues where the client input is more than 2000 characters and we end up missing out on the record. I am not sure if setting the field(s) to maximum characters would be the best way to solve this.

What would be the best way to handle such arbitrary large text input ?

Was it helpful?

Solution

Use a CLOB (Character Large Object) column. These can store up to 4gb of character data.

OTHER TIPS

CLOB. It's slower, can't be a primary key, some other limitations apply; but it can hold up to 4Gb.

If you're confident the client input will never exceed 4000 characters then you can increase the field size to that. Otherwise, you'll need to use a CLOB.

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