SELECT * FROM tab WHERE x='YES' OR x='NO' OR x='PERHAPS' OR x='MAYBE';or
SELECT *
FROM tab
WHERE x IN ('YES','NO','PERHAPS','MAYBE');
SELECT commands are not "thrown" to optimizer directly as string,
but are first compiled into BLR (Binary Language Representation).RDB$PROCEDURE_BLR field in RDB$PROCEDURES table etc.).
Note: To be more precise, IB5 generated identical BLRs. Due to changes in IB6, parts of generated BLR code
can be slightly reordered, which should not however affect the optimizer.
These two clauses do generate identical BLR in IB6/FB:
"WHERE ((x='YES' OR x='NO') OR x='PERHAPS') OR x='MAYBE'"
"WHERE x IN ('YES','NO','PERHAPS','MAYBE')"