Skip to content

Instantly share code, notes, and snippets.

@cloverink
Last active March 27, 2023 09:56
Show Gist options
  • Save cloverink/20e4316b0eab88267ab002a0f9638a95 to your computer and use it in GitHub Desktop.
Save cloverink/20e4316b0eab88267ab002a0f9638a95 to your computer and use it in GitHub Desktop.
How to Duplicate a Table in PostgreSQL
create table m_data_1 as (select * from m_data);
create table m_data_2 as (select * from m_data) with no data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment