CREATE TABLE new_table_name AS
(SELECT * FROM existing_table)
While this is another tip for quickly creating a table with the same column name of an existing table.
CREATE TABLE new_table_name AS
(SELECT * FROM existing_table WHERE 1 = 2)
Notice the where condition. You could actually change it to any condition that returned false (e.g 1=0). The select statement will select nothing.
No comments:
Post a Comment