To make a copy of the table tableOriginal which is in a different database called production into a new table called tableDuplicate in the currently selected database, use these two commands:
The first command creates the new table recipes_new by duplicating the structure of the existing table. The second command copies the data from old to new.
CREATE TABLE
tableDuplicate LIKE production.
tableOriginal ;
INSERT into
tableDuplicate SELECT * FROM production.
tableOriginal ;
The first command creates the new table recipes_new by duplicating the structure of the existing table. The second command copies the data from old to new.
No comments:
Post a Comment