

# ALTER TABLE SET LOCATION
<a name="alter-table-set-location"></a>

Altera o local da tabela chamada `table_name` e, como opção, uma partição com `partition_spec`.

## Resumo
<a name="synopsis"></a>

```
ALTER TABLE table_name [ PARTITION (partition_spec) ] SET LOCATION 'new location'
```

## Parâmetros
<a name="alter-table-set-location-parameters"></a>

**PARTIÇÃO (partition\$1spec)**  
Especifica a partição com parâmetros `partition_spec` cujo local você deseja alterar. O `partition_spec` especifica uma combinação nome/valor na forma `partition_col_name = partition_col_value`.

**SET LOCATION 'new location'**  
Especifica o novo local, que deve ser um local do Amazon S3. Para obter informações sobre sintaxe, consulte [Local da tabela no Amazon S3](tables-location-format.md).

## Exemplos
<a name="alter-table-set-location-examples"></a>

```
ALTER TABLE customers PARTITION (zip='98040', state='WA') SET LOCATION 's3://amzn-s3-demo-bucket/custdata/';
```