반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- PANDAS
- django
- Google Spreadsheet
- Excel
- Kotlin
- array
- c#
- SQL
- string
- Tkinter
- list
- dataframe
- Apache
- math
- GIT
- google apps script
- Java
- hive
- numpy
- Google Excel
- Redshift
- Mac
- Github
- Python
- 파이썬
- PySpark
- gas
- PostgreSQL
- matplotlib
Archives
- Today
- Total
달나라 노트
Redshift : values too long for type character varying error 해결하기 본문
SQL/Redshift
Redshift : values too long for type character varying error 해결하기
CosmosProject 2021. 6. 16. 12:57728x90
반응형
table을 생성하고 insert into로 데이터를 insert하거나 update를 할 때 아래와 같은 에러가 발생할 수 있습니다.
values too long for type character varying
위 에러는 table에 있는 column의 최대 길이보다 insert 또는 update할 값의 길이가 더 길어서 값을 담지 못할 때 발생합니다.
이런 경우 alter table, alter column을 이용하여 column의 최대 길이를 늘려주면 됩니다.
Syntax는 아래와 같습니다.
alter table table_name
alter column column_name type data_type
;
alter table main.items
alter column item_name type varchar(max)
;
위 예시는
main.items table에 존재하는 item_name column의 data type을
varchar(max)로 변경합니다.
728x90
반응형
'SQL > Redshift' 카테고리의 다른 글
Comments