I have a database (it's Postgres, if that matters) and I would like to take two of its tables, export them, and then import them into another database. How do I do that?
Edited to add Google bait: dump load
I have a database (it's Postgres, if that matters) and I would like to take two of its tables, export them, and then import them into another database. How do I do that?
Edited to add Google bait: dump load
Use pg_dump with the -t option (which you can specify multiple times):
Restore in the new database:
If the other database is not managed by Postgresql use pg_dump, as in Gary's hint, but with the -D flag, it makes the import process much more robust. You will have to create the schemas on the target system
(sorry, can't add a comment to Gary's answer as I don't have enough points)