Copy a database, schema and content, into another one

CREATE DATABASE newdb TEMPLATE olddb

Rename a table

ALTER TABLE oldname RENAME TO newname