Skip to content

Copy table structure from one db to new db with SQLAlchemy

from sqlalchemy import Table, MetaData
metadata = MetaData(bind=db1)
table = Table(duplicate_table, metadata, autoload=True, autoload_with=db1)
See also  Lonely Integer - Hackerrank Challenge - Java Solution

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.