예전에 테이블 명 및 인덱스 이름을 지을때 30자를 넘으면 또 자를 걱정을 했는데.
앞으로는 그럴 필요 없을듯 합니다.
그렇다고 무제한은 아닙니다.
== 샘플 입니다. ==
CREATE TABLE QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP
(ID NUMBER);
CREATE UNIQUE INDEX QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP_PK
ON QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP
(ID);
ALTER TABLE QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP
ADD CONSTRAINT QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP_PK PRIMARY KEY (ID);
SQL> SELECT LENGTHB(OBJECT_NAME) FROM DBA_OBJECTS WHERE OBJECT_NAME ='QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP';
LENGTHB(OBJECT_NAME)
--------------------
52
1 rows selected.
SQL> SELECT LENGTHB(OBJECT_NAME) FROM DBA_OBJECTS WHERE OBJECT_NAME ='QWERTYUIOPASDFGHJKLZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLP_PK';
LENGTHB(OBJECT_NAME)
--------------------
55
참고 url :
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/Database-Object-Names-and-Qualifiers.html#GUID-75337742-67FD-4EC0-985F-741C93D918DA
If COMPATIBLE is set to a value of 12.2 or higher, then names must be from 1 to 128 bytes long with these exceptions:
Names of databases are limited to 8 bytes.
Names of disk groups, pluggable databases (PDBs), rollback segments, tablespaces, and tablespace sets are limited to 30 bytes.
If an identifier includes multiple parts separated by periods, then each attribute can be up to 128 bytes long. Each period separator, as well as any surrounding double quotation marks, counts as one byte. For example, suppose you identify a column like this