Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Table 1 id - name 1 - ric 2 - joe 3 - harry 4 - james Table 2 sno - Tbl_1_Id - notes 1 - 1 - abcdef 2 - 4 - xyzzz
I want the result to be
id - name - notes 1 - ric - abcdef 2 - joe - 3 - harry- 4 - james- xyzzz
SELECT t1.id, t1.name, t2.notes FROM Table1 t1 LEFT OUTER JOIN Table2 t2 ON t1.id = t2.Tbl_1_Id
Add a comment
Use a left join.
SELECT t1.id, t1.name, t2.notes FROM table1 as t1 LEFT JOIN table2 as t2 ON (t1.id = t2.tbl_1_id)
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.