Use of in Function
- Whenever a field needs to be tested against a list of valid values it is recommended to use the IN function and not compare the field against each and every value.
- Wrong way:
- Select ...
- From ...
- Where ... (A = '10' or A='20' or A='30')
- Right way:
- Select ...
- From ...
- Where ... A IN ('10','20','30')
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Documentation build: 7.30.2019 15:44:44 [SDK_1564515884000]