SELECT tu.ID,
tu.NAME,
CASE WHEN tf.ID IS NOT NULL THEN 'true' ELSE 'false' END AS Flagged
FROM TABLE_USER tu
LEFT OUTER JOIN TABLE_FLAGS tf ON tu.ID = tf.ID
SELECT tu.ID,
tu.NAME,
CASE WHEN tf.ID IS NOT NULL THEN 'true' ELSE 'false' END AS Flagged
FROM TABLE_USER tu
LEFT OUTER JOIN TABLE_FLAGS tf ON tu.ID = tf.ID