I am able to create table sales_order in database archived_db with the same schema as sales_order table from main database prod_db using below query:
CREATE TABLE archived_db.sales_order LIKE prod_db.sales_order
It is working fine and creating sales_order table in archived_db with same table structure as in prod_db. One thing that is not copied/created is the foreign key.
so, my question is, is it possible to create table B using schema of table A with the same foreign_keys?