how to rename a table without re creating it

前端 未结 3 597
长情又很酷
长情又很酷 2020-12-18 18:53

I didn\'t find a RENAME option to alter table name. I have a case that I must rename a table, and the only way is to select with result to new table. this query cost money,

3条回答
  •  长情又很酷
    2020-12-18 19:32

    There is no rename option, but there is a copy operation, which uses a fast snapshot process. This doesn't incur any additional charges other than the additional cost of storage (of course you can delete the original table so you only get charged for the storage once).

    You can do this in the BigQuery by clicking on the table name and the dropdown arrow next to the table name, then selecting 'copy table'. Alternately you can use the bq cp command in the bq command-line tool.

提交回复
热议问题