Skip to content

Instantly share code, notes, and snippets.

@krzykamil
Last active February 13, 2019 13:21
Show Gist options
  • Save krzykamil/f3a913f9044d9a6e3848fe79bc48d3d3 to your computer and use it in GitHub Desktop.
Save krzykamil/f3a913f9044d9a6e3848fe79bc48d3d3 to your computer and use it in GitHub Desktop.
INSERT INTO
empty_new_table
SELECT
*
FROM
(WITH old_table_data AS (
SELECT
data1,
data2,
data3
FROM
full_old_table
)
SELECT
*
FROM
old_table_data
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment