Python

PHOTO EMBED

Fri Mar 29 2024 04:50:38 GMT+0000 (Coordinated Universal Time)

Saved by @nisarg #python #alchemy

engine = db.create_engine('sqlite:///datacamp.sqlite')
conn = engine.connect()
metadata = db.MetaData()

Student = db.Table('Student', metadata,
              db.Column('Id', db.Integer(),primary_key=True),
              db.Column('Name', db.String(255), nullable=False),
              db.Column('Major', db.String(255), default="Math"),
              db.Column('Pass', db.Boolean(), default=True)
              )

metadata.create_all(engine)
content_copyCOPY

https://chat.openai.com/c/3b5c2278-473d-438e-9e61-751049b61730