Thursday, August 22, 2019

Re: Django sql raw query to queryset

You can use Queryset like -

course_review_report.objects.select_related('courses') 

On Fri, 23 Aug, 2019, 11:07 AM Suraj Thapa FC, <surajthapafc@gmail.com> wrote:
SELECT * 
FROM course_review_report LEFT JOIN courses ON course_review_report.cid = courses.cid


Can anyone pls write the querryset for the above sql query

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPjsHcFbqD%2BgX1NA8QLYFsJUkb9VydzzcBRrNO2FpCyAgS0nqw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGHZBzyCMzkdjvjdAg4MbF0tQgotCZkorunJQbi4v1xEqsFsBw%40mail.gmail.com.

No comments:

Post a Comment