ustbwang 发表于 2017-5-4 11:50:06

python数据库查询相关笔记

  


Participation.objects.extra(where=['user_id IN (select user_id from webverse_userprofile where parent_id = 1)']).order_by('-created_at')
 查询Participation表中user_id字段包含在子查询结果中的记录集
页: [1]
查看完整版本: python数据库查询相关笔记