Previous Topic: Name SearchingNext Topic: Probing the Table Twice


Name Change

To search for two variations of a name to try and find someone in your database, code a name reversal. This query accomplishes your goal, but it uses multi-index access at its best.

SELECT PERSON_ID
FROM   PERSON_TBL
WHERE  (LASTNAME = 'RADY' AND
        FIRST_NAME = 'BOB') OR
       (LASTNAME = 'BOB' AND
        FIRST_NAME = 'RADY');