I'm still a bit of a stranger when it comes to character set and encoding, so I apologize in advance for any of my misconception.
I'm using Oracle 10g as a DBMS for my web application. My database is configured to UTF-8.
Database information:
SQL> SELECT * FROM NLS_DATABASE_PARAMETERS
PARAMETER VALUE
------------------------------ --------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET UTF8
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 10.2.0.3.0
I have a database table that contains a column with a width limit of 1500.
Table details:
COLUMN_NAME DATATYPE
------------------------------ --------------------------------
TEST_COLUMN VARCHAR2(1500 BYTE)
Initially, being the noobie I am, I thought that the 1500 limit, which was set to the column, was a unit of number of CHARACTER, but found out later that it actually is the unit of number of BYTE.
What I am aiming at is to limit the number of character's to 1500, thus setting VARCHAR2(1500)
would only apply to single-byte encoding.
So because I am using UTF-8, which uses multi-byte encoding, I was wondering what would be the correct value to set on my column width which would limit it to 1500 multi-byte character?