반응형
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
- Github
- array
- c#
- GIT
- Apache
- PySpark
- matplotlib
- Excel
- string
- gas
- PostgreSQL
- hive
- PANDAS
- django
- Kotlin
- Mac
- list
- Google Spreadsheet
- Google Excel
- Python
- Tkinter
- Redshift
- 파이썬
- math
- SQL
- numpy
- Java
- google apps script
- dataframe
Archives
- Today
- Total
목록if exists (2)
달나라 노트
Hive : table 복구 불가능하게 drop하기. drop table ~ purge
일반적으로 drop table (if exists) 위처럼 drop table 구문을 사용하면 table이 drop되긴 하지만 휴지통 directory에 해당 table이 이동되며 drop된 table을 복구할 수 있습니다. drop table (if exists) purge 그런데 위처럼 drop table 구문의 가장 끝에 purge를 적어주면 table drop 시에 휴지통 directory로 이동하지 않고 완전히 table이 삭제되며 이 경우 table 복구가 불가능합니다.
SQL/Apache Hive
2021. 5. 19. 15:43
Redshift : create table, drop table (테이블 생성하고 삭제하기)
create table test_schema.test_table ( col1 varchar(max), col2 bigint(max), col3 varchar(max) ) ; create table은 위처럼 테이블을 생성시킬 수 있도록 합니다. 위 테이블은 col1, col2, col3라는 3개의 column을 가질 것이고, 각 컬럼에 들어갈 값들의 datatype은 순서대로 varchar(문자), bigint(정수), varchar(문자)입니다. create table if not exists test_schema.test_table ( col1 varchar(max), col2 bigint(max), col3 varchar(max) ) ; 또한 if not exists라는 옵션을 추가할 수도 있습니다...
SQL/Redshift
2021. 1. 21. 20:52