Created
May 11, 2015 04:57
-
-
Save MattMS/7aec763513176a0e9161 to your computer and use it in GitHub Desktop.
Copy part of a table into a new table.
This file contains 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
INSERT INTO other_schema.new_table (id, name, definition) | |
SELECT old_id, old_name, old_definition | |
FROM original_schema.current_table | |
WHERE old_name IS NOT NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment