Starting from 12c, Oracle Database provides a way to control the max byte-size of a
NVARCHAR2 column. To use up to 32767 bytes instead of 4000, one has to set the parameter
Now, let's say I create dynamically tables from a Java application and I always want to use the max size for an
NVARCHAR2 column, how can I get the max current value?
I know, I can do a select like
SELECT value FROM v$parameter WHERE name = 'max_string_size'
and check if the value is
EXTENDED, but to me it looks more professional and robust if I can replace a statement like
CREATE TABLE mytable (mycolumn NVARCHAR2(32767))
CREATE TABLE mytable (mycolumn NVARCHAR2($system_var_for_max_size))
So, is there any system variable that stores the max size that I can use as in the previous example?