I have two tables:
ReservationName
ReservationName
+-------+-------+-------+-------+ | Name | +-------+-------+-------+-------+ | Brad Pitt | | Morgan Freeman | | Bobby deniro | +-------+-------+-------+-------+ BookingDetails
+-------+-------+-------+-------+ | Name | ID |Eid | Eid | +-------+-------+-------+-------+ | Brad Pitt | 1 | ab123 | ab123 | | Morgan Freeman | 2 | pq123 | pq123 | | Bobby deniro | 3 | rs123 | rs123 | +-------+-------+-------+-------+ I have to match the names in ReservationName with BookingDetails . If
If they are same (count and value) .
Above example of mine should return true as names are identical and count is 3. The aforementioned condition is part of If exists logic that I am using in spa stored procedure.