What is the preferred datatype of a text field where the length is unknown? The text field could be small or very large. For example, I'm collecting forum comments and will not know the length of a particular comment (field). What datatype is preferred?
BLOB or CLOB. Based on your description, I think CLOB (Character Large Object). Here is one place to look.
However, you should know in advance that while CLOBs are relatively easy to deal with, it may be more complicated than you planned. VARCHAR2s are often acceptable, if by "unknown" you mean less than 4000 bytes. And dealing with them is pretty simple and straight forward.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With