Help for this page

Select Code to Download


  1. or download this
    SELECT t1.col1, t2.col5
      FROM t1
    ...
      FROM t1
      JOIN t3 ON t3.tid = t1.tid
      WHERE t3.col4 = 42 AND ...
    
  2. or download this
    SELECT t1.col1, coalesce(t2.col5, t3.col5) AS col5
    FROM t1
    LEFT JOIN t2 ON t2.tid = t1.tid AND t2.col3 = 99
    LEFT JOIN t3 ON t3.tid = t1.tid AND t3.col4 = 42
    WHERE ...