Get started with AnySQL utility -- chapter 5
In AnySQL, we could manipulate LONG/LONG RAW/BLOB/CLOB easily by uploading a client file to the database, however it's impossible in SQL*Plus:
Create a table with LONG type column, as following:
ASQL> DESC T_LONG
NO# NAME NULLABLE TYPE
--- ---------------- -------- ----
1 COL1 LONG
Now I will insert a shell script file in to the table, you can insert or update this field by declare a CLOB (for LONG and CLOB columns) or BLOB (for LONG RAW and BLOB columns) type host variable, and define it a file name (including path) as variable value, then reference it (start with ":") in the SQL as following:
ASQL> VAR P_LONG CLOB
ASQL> define p_long=otop
ASQL> insert into t_long values (:p_long);
1 rows affected.
ASQL> commit;
And we could directly query the long value type in AnySQL directly, maximumly 64KB will be displayed:
