📜  flask sqlalchemy 删除重复项 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:26.686000             🧑  作者: Mango

代码示例1
mylist = db.session.query(User.name).all() # get all user.name from db
mylist1 = len(list(dict.fromkeys(mylist))) # remove the duplicate then use len() to find total