1) AND(&) - Combine two QuerySets using SQL AND operator.
Example -
student_data = student.objects.fitler(id=6) & student.objects.fitler(roll=107)
student_data = student.objects.fitler(id=6, roll=107)
student_data = student.objects.fitler(Q(id=6) & Q(roll=107))
SQL Query : select * from student where id=6 AND roll=107
2) OR(|) - Combine two QuerySets using SQL OR operator.
Example -
student_data = student.objects.fitler(id=6) | student.objects.fitler(roll=107)
student_data = student.objects.fitler(Q(id=6) | Q(roll=107))
SQL Query : select * from student where id=6 OR roll=107
0 Comments
Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only मराठी / English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....