新建模型 class Author(models.Model): nid = models.AutoField(primary_key=True) name=models.CharField( max_length=32) age=models.IntegerField() # 与AuthorDetail建立一对一的关系 authorDetail=models.OneToOneField(to="AuthorDetail") class AuthorDetail(models.Mode
用a*my写原味sql from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy import create_engine Base = declarative_base() # 创建单表 class Users(Base): __tablename__ = 'users' id = Column(Integer, p