Writing Select statement to join multiple tables I have a database that is designed like so: 



And I would like to write a SELECT statement that returns all rows from all tables. I have tried the following but always get 0 results returned:

SELECT 
* 
FROM TABLEB
INNER JOIN TABLEA on TABLEB.TableAId = TableA.ID
INNER JOIN TABLEC on TABLEB.TableCId = TableC.ID
INNER JOIN TABLED on TABLEC.TableDId = TableD.ID
INNER JOIN TABLEE on TABLEC.TableEId = TableE.ID
Change the INNER JOIN to LEFT JOIN. There's a chance there are missing foreign key values that are causing it to not find any matches across the whole set.

Where you see NULL in the result set, will be an indicator where there is no matching foreign key.