Have two tables say ABC and XYZ and contain one column which data will be unique across these table. Now I have id with me but don’t know in which table this id belongs. Is it possible to fetch record in single query with that id from ABC or XYZ?
Thanks in advance.
Yes, you can use
UNION(implicit distinct) orUNION ALL(with duplicate values) to get all id’s from the two tables: