반응형
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 | 29 | 30 | 31 |
Tags
- Google Excel
- PostgreSQL
- Google Spreadsheet
- Kotlin
- Redshift
- Mac
- 파이썬
- Github
- gas
- Tkinter
- PySpark
- Python
- c#
- hive
- dataframe
- Apache
- google apps script
- SQL
- PANDAS
- numpy
- list
- Excel
- array
- matplotlib
- GIT
- Java
- math
- django
- string
Archives
- Today
- Total
달나라 노트
Redshift : alter table ~ rename column ~ (column 이름 변경, column 이름 바꾸기) 본문
SQL/Redshift
Redshift : alter table ~ rename column ~ (column 이름 변경, column 이름 바꾸기)
CosmosProject 2022. 10. 19. 19:33728x90
반응형
alter table 구문을 이용하면 table에 존재하는 column의 이름을 바꿀 수 있습니다.
Syntax
alter table (table_name) rename column (original_column_name) to (new_column_name)
(table_name) = 변경 내용을 적용할 table 이름
(original_column_name) = 이름을 변경할 기존의 column 이름
(new_column_name) = 변경할 새로운 column 이름
alter table test_schema.test_table
rename column col3 to dt_col;
위 예시에 있는 alter table 구문을 실행하면 test_schema.test_table에 있는 col3 컬럼 이름이 dt_col로 바뀌게 됩니다.
728x90
반응형
'SQL > Redshift' 카테고리의 다른 글
Comments