how to retrieve data from multiple tables in sql
-- b.VALUE1 is null when ID not in table2
-- LEFT OUTER JOIN is equivalent to LEFT JOIN
SELECT a.ID, a.NAME, b.VALUE1 FROM1 table1 a
LEFT OUTER JOIN table2 b
ON a.ID = b.ID
WHERE a.ID >= 1000;
-- ⇓ Test it ⇓ (Fiddle source link)