SyntaxFix
Write A Post
Hire A Developer
Questions
Use a CASE statement and do it like this:
CASE
SELECT T1.Id [Id] ,CASE WHEN T2.Id IS NOT NULL THEN 'TRUE' ELSE 'FALSE' END [Has Foreign Key in T2] FROM TABLE1 [T1] LEFT OUTER JOIN TABLE2 [T2] ON T2.Id = T1.Id