0

I have a table books, I want to create table Book101 and then copy the contents of table books into it.

1 Answers1

0
CREATE TABLE Book101 AS SELECT * FROM books WHERE 1=0;

Above example will create only structure.

If you want to Clone the table with structure and data both then you can you below one:

CREATE TABLE Book101 AS SELECT * FROM books;
Owen Kelvin
  • 14,054
  • 10
  • 41
  • 74