• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1818
  • Last Modified:

How to create a new table from an existing table

I wish to create a new table using the structure from an existing table. I don't want to use the Create statement all over again for the new table. I believe the syntax goes something like this:

 create new_table_name from select * from old_table_name where 0 = 1

but I am not really sure.
0
geeta_m9
Asked:
geeta_m9
  • 2
1 Solution
 
sdstuberCommented:
you're very close...

create t able new_table_name AS select * from old_table_name where 0 = 1
0
 
geeta_m9Author Commented:
Thanks!
0
 
geeta_m9Author Commented:
Thanks!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now