import random rand = random.randrange(0, session.query(Table).count()) row = session.query(Table)[rand]. 這有點作弊,但這就是為什麼要使用orm。
確定! 回上一頁