LONG Data Type
LONG
columns store variable-length character strings containing up to 2 gigabytes -1, or 231-1 bytes.LONG
columns have many of the characteristics ofVARCHAR2
columns. You can useLONG
columns to store long text strings. The length ofLONG
values may be limited by the memory available on your computer. (Oracle SQL Language Reference Long Data Type)
Sample Source Patterns
Long in Create Table
Oracle
Snowflake
Retrieving data from a Long column
Oracle
Snowflake
Known Issues
1. The max length of long (Oracle) and varchar (Snowflake) are different
According to Oracle documentation, Long column can store up to 2 gigabytes of data, but Snowflake varchar is limited to 16Mb.
2. Cast of Long column
Long data type only can be cast to CLOB data type, and the only way to achieve this is using the TO_LOB function, this function only works if is used in the select list of a subquery in an INSERT statement. Consider the following sample
Oracle
If the target table column data type is different from CLOB, Oracle may insert null values or display an error when attempting to insert the data.
Related EWIs
SSC-FDM-0006: Number type column may not behave similarly in Snowflake
Last updated