Q:

SQL - no rows selected after inner join - I don't get it

Ok here are my two tables I'm trying to do a join on, using ORACLE:
FOURNISSEUR

TABLE4

And I'm sorry for copying pictures but I'm having a hard time copying tables from MYSQLPLUS..
I'm trying to do a join on NF but it doesn't seem to work... what am I doing wrong?
SELECT fournisseur.NF,fournisseur.NomF
FROM fournisseur
INNER JOIN table4
ON fournisseur.NF=table4.NF
ORDER BY fournisseur.NF;

And yeah I feel stupid..

A:

Does the NF column in the fournisseur table have spaces after the values?
The column heading for fournisseur.NF looks really wide and appears to be displaying a VARCHAR2(20) (or CHAR(20); but see below) column which could also mean there is extra white-space.
Try trimming the values. e.g. 
ON TRIM(fournisseur.NF) = table4.NF

If this indeed works, then I'd look into using CHAR(2), which is hopefully the same type as table4.NF, for fournisseur.NF which would avoid this issue simply by not allowing the extra spaces to begin with.
Since filler spaces on the end of a CHAR(n) field "don't mean anything" then using CHAR(n) types throughout would also remove the observed issue.

Here is a SQL Fiddle, modified from Coat CO's comment, which shows lack-of-join behavior when there are extra spaces in a VARCHAR2(n) column.

