You can create a copy of a table using the SELECT INTO command.
SELECT * INTO TABLE2 FROM TABLE1
You can also join two or more tables and create a new table from the joined tables.
SELECT * INTO TABLE3 FROM TABLE1 a LEFT OUTER JOIN TABLE2 b ON a.field1 = b.field5
The newly created table will not have a primary key even if the existing table or tables do have a primary key.
Leave a comment