IF EXISTS
(SELECT TOP 1 field1
FROM table1
WHERE field1 = myValue)
THEN
RETURN true
ELSE IF EXISTS
(SELECT TOP 1 field2
FROM table2
WHERE field2 = myValue)
THEN
RETURN true
ELSE
RETURN false
END IF
I eventually need this to be in a stored procedure. I have to believe that only querying the minimum necessary tables is more efficient than unioning a couple the separate queries.