CREATE TABLE foo SELECT * FROM bar
copies the table foo and duplicates it as a new table called bar.
How can I copy the schema of foo to a new table called bar without copying over the data as well?
CREATE TABLE foo SELECT * FROM bar
copies the table foo and duplicates it as a new table called bar.
How can I copy the schema of foo to a new table called bar without copying over the data as well?
Only want to clone the structure of table:
CREATE TABLE foo SELECT * FROM bar WHERE 1 = 2;
Also wants to copy the data:
CREATE TABLE foo as SELECT * FROM bar;