Reputation: 39
I am facing this problem and I tried hard but can't solve this problem. This is so much important for me because my exam will start within 2 weeks. So please help me.
my code is here,
SELECT DISTINCT course_id FROM section
WHERE semester = 'Fall' and year = 2009 AND course_id NOT IN(
SELECT course_id
FROM section
WHERE semester = 'Spring' AND year = 2010);
My output is something like that,
I tried in different version of phpmyadmin and it's worked.
My database is here,
Upvotes: 0
Views: 33
Reputation: 780724
By default, PhpMyAdmin only shows the first 25 rows of results, and it does this by adding LIMIT 0, 25
to the end of the query. It looks like it has a bug in the way it's adding this to your query, because it's putting it after AND course_id NOT IN (
instead of putting it all the way at the end.
I guess this option is turned off in the other version of PhpMyAdmin, or the bug is fixed.
Upvotes: 1
Reputation: 240
Could simplify the above query this way:
SELECT DISTINCT course_id FROM section course_id NOT IN(
SELECT course_id
FROM section
WHERE semester = 'Spring' AND year = 2010)
Upvotes: 0