|
Yes.
Should you ever be in doubt as to whether some SQL construction is valid,
run it through the
Mimer Validator.
In this instance, your query—entered into the validator exactly as you
wrote it—produces the following results:
What this means is that if your particular database system does not
support those optional features, then you will still get an error message.
You might want to try the following alternative query:
SELECT a,c,d
FROM mytable
WHERE a = 1 AND b = 2
OR a = 1 AND b = 4
OR a = 1 AND b = 5
This works quite well because (a,b) is a key, so index lookups will be efficient.
|