What is the maximum length of a table name in Oracle?

前端 未结 12 1516
不知归路
不知归路 2020-12-07 09:04

What are the maximum length of a table name and column name in Oracle?

相关标签:
12条回答
  • 2020-12-07 09:34

    I'm working on Oracle 12c 12.1. However, doesn't seem like it allows more than 30 characters for column/table names.

    Read through an oracle page which mentions 30 bytes. https://docs.oracle.com/database/121/SQLRF/sql_elements008.htm#SQLRF00223

    In 12c although the all_tab_columns do say VARCHAR2(128) for Table_Name, it does not allow more than 30 bytes name.

    Found another article about 12c R2, which seems to be allowing this up to 128 characters. https://community.oracle.com/ideas/3338

    0 讨论(0)
  • 2020-12-07 09:36

    DESCRIBE all_tab_columns

    will show a TABLE_NAME VARCHAR2(30)

    Note VARCHAR2(30) means a 30 byte limitation, not a 30 character limitation, and therefore may be different if your database is configured/setup to use a multibyte character set.

    Mike

    0 讨论(0)
  • 2020-12-07 09:37

    The maximum name size is 30 characters because of the data dictionary which allows the storage only for 30 bytes

    0 讨论(0)
  • 2020-12-07 09:38

    In Oracle 12.2 and above the maximum object name length is 128 bytes.

    In Oracle 12.1 and below the maximum object name length is 30 bytes.

    0 讨论(0)
  • 2020-12-07 09:39

    Right, but as long as you use ASCII characters even a multibyte character set would still give a limitation of exactly 30 characters... so unless you want to put hearts and smiling cats in you're DB names your fine...

    0 讨论(0)
  • 2020-12-07 09:39

    In the 10g database I'm dealing with, I know table names are maxed at 30 characters. Couldn't tell you what the column name length is (but I know it's > 30).

    0 讨论(0)
提交回复
热议问题