My original query is:
SELECT * from test where ID BETWEEN 10 AND 100
INTERSECT
SELECT * from test where MARKS=10
But, INTERSECT
is not working in MySQL
I am querying from the same table and INNER JOIN
is not working.
My original query is:
SELECT * from test where ID BETWEEN 10 AND 100
INTERSECT
SELECT * from test where MARKS=10
But, INTERSECT
is not working in MySQL
I am querying from the same table and INNER JOIN
is not working.
This looks like it should work fine.
SELECT * from test where ID BETWEEN 10 AND 100
INTERSECT
SELECT * from test where MARKS=10
However you can verify it against this, which is a better way to do the same thing.
SELECT * from test where ID BETWEEN 10 AND 100
and MARKS=10
If the both give you the same then they are both working and there is something about your data you don't understand.