SonicBase. In-memory embedded or distributed streaming sql database

SQL Left Outer Join Statement

Performs a join where all records in the left table are returned. If there is no matching record on the right then null is returned for the right side.


SELECT select_columns FROM table_name LEFT OUTER JOIN join_table ON join_criteria
join_table:   table to join with
join_criteria:   where clause that specifies how records must match between the tables


PreparedStatement stmt = conn.prepareStatement(
    "select, persons.socialsecuritynumber, memberships.membershipname, memberships.personid from persons
    left outer join Memberships on = Memberships.PersonId where memberships.personid<2  order by memberships.personid desc");

ResultSet ret = stmt.executeQuery();