Created
March 29, 2015 03:44
-
-
Save 0x07dc/fc2dfed5f5d63450c6eb to your computer and use it in GitHub Desktop.
Copy tables in MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drawn from http://stackoverflow.com/a/15649857/2016196 | |
# To make a new table | |
CREATE TABLE YourNewTable | |
SELECT * | |
FROM mygrist_tables | |
WHERE suic_att>=5 AND gender='M'; | |
# To copy to an existing table | |
INSERT INTO YourNewTable | |
SELECT * | |
FROM mygrist_tables | |
WHERE suic_att>=5 AND gender='M'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment