# Create table ... as

Often you want to create a copy of an existing table, for instance an adhoc backup. The basic syntax is:

CREATE TABLE `my-project.my-dataset.table_name_bkp_20220701`
AS
SELECT * FROM `my-project.my-dataset.table_name`

This copies all the data across, but you will lose some features of the original, like partitioning. Note that above the backup is created with a table suffix. I like this as visually all of these backups will be stored under the same 'multi table' in the UI, and you can query across multiple backups if you like using wildcards and _TABLE_SUFFIX commands.

# Create table ... as WITH PARTITION

If you want to maintain the original partitioning from your source table, or apply a new one, you can use the following:

CREATE TABLE `my-project.my-dataset.table_name_bkp_20220701`
PARTITION BY
DATE(source_datetime)
AS
SELECT * FROM `my-project.my-dataset.table_name`

This then creates the a DAY partition using the source_datetime field - making it cheaper to query only specific days - and faster too!