

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 移除資料欄
<a name="updates-removing-columns"></a>

您可能需要從資料表中移除已不再包含資料的欄，或是限制存取這些欄的資料。
+ 您可以從 JSON、Avro 及 Parquet 和 ORC (如果依名稱讀取) 的資料表中移除欄。如需相關資訊，請參閱[了解 Apache ORC 和 Apache Parquet 的索引存取](handling-schema-updates-chapter.md#index-access)。
+ 如果想要保留您在 Athena 中已建立的資料表，則不建議從 CSV 和 TSV 格式的資料表中移除資料欄。移除資料欄會破壞結構描述，而且您需要重新建立不含已移除的資料欄的資料表。

在這個範例中，從 Parquet 的資料表中移除 ``totalprice`` 資料欄，並執行查詢。在 Athena 中，預設會依名稱讀取 Parquet，因此我們省略 SERDEPROPERTIES 組態 (指定依名稱讀取)。請注意，即使您變更結構描述，以下查詢也會成功：

```
CREATE EXTERNAL TABLE orders_parquet_column_removed (
   `o_orderkey` int, 
   `o_custkey` int, 
   `o_orderstatus` string, 
   `o_orderdate` string, 
   `o_orderpriority` string, 
   `o_clerk` string, 
   `o_shippriority` int, 
   `o_comment` string
) 
STORED AS PARQUET
LOCATION 's3://amzn-s3-demo-bucket/orders_parquet/';
```