Copy table with or without data

Other topics

Copy Table With Data

CREATE TABLE myschema.tableNew AS (
    SELECT *
    FROM myschema.tableOld
) WITH  DATA

Copy Table without data

CREATE TABLE myschema.tableNew AS (
    SELECT *
    FROM myschema.tableOld
) WITHOUT  DATA

Copy Table with where clause

CREATE TABLE myschema.tableNew AS (
    SELECT *
    FROM myschema.tableOld
WHERE column1 = 'myCriteria'
) WITH  DATA

Syntax:

  1. CREATE TABLE schemaName.table AS (SELECT columns FROM schemaName.table) WITH DATA

Contributors

Topic Id: 8778

Example Ids: 27362,27363,27364

This site is not affiliated with any of the contributors.