MySQL copy table with and without data;
CREATE TABLE IF NOT EXISTS table_copy
SELECT * FROM table;
We can also use the below which also copies the table structure (keys and so on);
CREATE TABLE IF NOT EXISTS table_copy LIKE table;
INSERT table_copy
SELECT * FROM table;
No comments:
Post a Comment
Note: only a member of this blog may post a comment.