What do you want to save?
Add Code snippet
New code examples in category SQL
-
Snaggs 2021-08-29 08:21:01
how to select from two tables in sql
-- With JOIN -- No row if id does not exist in t2 SELECT t1.name, t2.salary FROM t1 JOIN t2 on t1.id = t2.id; SELECT t1.*, t2.salary FROM t1 JOIN t2 on t1.id = t2.id; -- A row with a NULL salary is returned if id does not exist in t2 SELECT t1.name, t2.sa... Add solution -