Search code examples
sqloracle-databaseoracle11galter

Alter a table column to 4000Byte - Oracle 11g


I need to give a script to DBA to alter the length of a column to 4000 Byte and not 4000 Char.

Since I cannot execute the script on DB due to inadequate permission and conflicting answers on Web, I am not sure of the script.

Please let me know if this one is correct:

ALTER TABLE AAA.BBB_CCC MODIFY(VALUE VARCHAR2(4000)); 

I think :

ALTER TABLE AAA.BBB_CCC MODIFY(VALUE VARCHAR2(4000 CHAR));

would create column size of 4000 Char


Solution

  • Neither is correct, try this:

    ALTER TABLE AAA.BBB_CCC MODIFY DDD varchar2(4000 BYTE);