본문 바로가기
Programming/Database

[Oracle DB] VARCHAR2 vs VARCHAR 차이

by 째스터 2024. 11. 21.
728x90

VARCHAR2와 VARCHAR data type은 같다.
그리고 공식 문서에서는 VARCHAR2 사용을 권장한다.

The VARCHAR datatype is synonymous with the VARCHAR2 datatype. To avoid possible changes in behavior, always use the VARCHAR2 datatype to store variable-length character strings.

https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i1835

 

Oracle Data Types

33/35 26 Oracle Data Types This chapter discusses the Oracle built-in datatypes, their properties, and how they map to non-Oracle datatypes. This chapter includes the following topics: Overview of Character Datatypes The character datatypes store character

docs.oracle.com

 

VARCHAR Data Type Do not use the VARCHAR data type. Use the VARCHAR2 data type instead. Although the VARCHAR data type is currently synonymous with VARCHAR2, the VARCHAR data type is scheduled to be redefined as a separate data type used for variable-length character strings compared with different comparison semantics.

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Data-Types.html#GUID-1BABC478-FB47-4962-9B0C-8B8BD059E733

 

SQL Language Reference

 

docs.oracle.com

 

728x90

댓글