Reputation: 31
SELECT name, address FROM global WHERE (type=3) AND WHERE (id BETWEEN 3 and 7);
syntax issue. but the idea is to only get row between 3 and 7 from the type 3 column.
I remove one of the () so WHERE(type=3) AND WHERE id BETWEEN 3 and 7. same error
Upvotes: 0
Views: 36
Reputation: 2103
You should use a between operator as below:
SELECT name, address FROM global WHERE type=3
AND id BETWEEN 3 and 7;
Upvotes: 1