check if id exists in multiple tables <p>I am using SQL Server 2012.</p> <p>I have 5 tables (lets call them A, B, C, D &amp; E). Each table contains a column called m_id, which contains id's that are nvarchar(10).</p> <p>I currently run the query below 5 times (changing the table name). To see if the table contains the id.</p> <pre><code>select m_id from A where m_id = 'some_id' </code></pre> <p>Basically I want to know if the id is any of the 5 tables, if so return 1 else if does not exist in any of the 5 tables return 0.</p> <p>I feel the current way I'm doing this is very inefficient. Is there a better way to do this? </p>