InterBase OUTER JOINs

Posted: (EET/GMT+2)

 

It seldom happens I need to use OUTER JOINs with any SQL database, but this time I needed to use them with InterBase.

There isn't much syntax information about how to do these things with InterBase, so I thought I might share my own piece of SQL.

Here's an example:

SELECT t1.id, t1.name, t2.ordercount
FROM mytable1 t1
LEFT OUTER JOIN mytable2 t2 ON (t1.id = t2.id)
WHERE (t1.name LIKE '%Johnson%')

Use this as your 101 for InterBase OUTER JOIN queries. :-)