SQL - Duplicate table structure with existing table

Some simply SQL which could duplicate table with table structure quickly from existing table.

Duplicate with full data


create table A_dup as (select * from A);


Duplicate with no data

create table A_dup as (select * from A) with no data; 

Comments

Popular Posts