varchar

차노·2023년 8월 29일
0

SQL

목록 보기
21/26

VARCHAR stands for "variable-length character". It is a data type used in relational database management systems (RDBMS) to store character string of varying length. In other words, varchar column can hold alphanumeric characters, such as letters and numbers, as well as symbols and spacs.

The key characteristic of the varchar data type is that it can store strings of different lengths, unlike a fixed-length character data type like 'char'.

고정적이지 않고 변화 가능한 문자/숫자 스트링 데이터 타입이다.

When you define a varchar column in a database table, you specify a maximum length for the. colun. The actual length of the data stored in the column can be less than or equal to this maximum length.

For example, if you define a VARCHAR(50) column, it can store strings of up to 50 characters in length. if you store a string that is only 10 characters long, the column will use only 10 character of storage space.

The usage of varchar is beneficial when the length of the data varies widely or is unpredictable. It helps to optimize storage space since only the actual data length is used, reducing wasted space for shorter strings.

0개의 댓글

관련 채용 정보