I have two table: (simplifyed)
- 'tabone' has the following columns: 'id' and 'hello'
- 'tabtwo' has the following columns: 'id' and 'hi'
I have this query:
SELECT tabone.hello, tabtwo.hi
FROM tabone, tabtwo
WHERE tabone.id = 5 AND tabtwo.id = 5
Now that works fine if there is and 'id' wich has the value 5 in both table, but the problem is that if tabtwo doesn't have any row with 5 in the id column, the query won't return anything at all. (when I want it to return the row in tabone wich does have 5 in the id column)
Is there any way to do this, or will I have to make two separate queries? Thanks.