ALTER statement: Why VARCHAR2 (50 BYTE) instead of VARCHAR2 (50 CHAR)?

I executed the following (Oracle 11g) SQL statement to increase the existing column length from VARCHAR2 (20 CHAR) to VARCHAR2 (50 CHAR):

ALTER TABLE USERX.MY_TABLE MODIFY (LASTNAME VARCHAR2(50));

This succeeded without incident, but when I look at the new column Data Type, I see: VARCHAR2(50 BYTE)instead VARCHAR2(50 CHAR).

My questions:

  • Why BYTE , not CHAR? What did I do wrong?
  • How to fix column length VARCHAR2(100 CHAR)?
+5
source share
1 answer

Answering a question (thanks to a hint by this other answer ):

I had to execute instead:

ALTER TABLE USERX.MY_TABLE MODIFY (LASTNAME VARCHAR2(50 CHAR));

(note extra CHARafter 50)

+9

All Articles