Re: Question about not required fields



"Norman" <norman@xxxxxxx> wrote in news:4313ac76@xxxxxxxxxxxxxxxxxxxxxx:

> SELECT T1.*, T2.* FROM T1, T2
> WHERE T1.F = T2.F
> ORDER BY T1.F
>
This SQL statement is the same with

SELECT T1.*, T2.* FROM T1
INNER JOIN T2 ON T1.F = T2.F
ORDER BY T1.F

What you need is something like

SELECT T1.*, T2.* FROM T1
LEFT JOIN T2 ON T1.F = T2.F
ORDER BY T1.F

The above statement will return all the rows
from T1 but not all the records from T2 will
be returned unless all the records on T2 are
linked to T1.

Regards
Yannis.
.



Relevant Pages

  • Re: Error messageORA-00979: not GROUP BY expression
    ... > I'm writing an application on a Oracle 8 database in combi with the ... The OLE DB provider is Microsoft for Oracle. ... > When I replace manually the parameter:BU to a string in the sql statement ...
    (borland.public.delphi.database.ado)
  • Re: QUERY CALCULATION BASED ON DATE RANGE?
    ... Apologies Phil....I have now fixed the problem....Kind Regards ... thankyou so much for your assistance it is very much appreciated! ... would be very much appreciated...and apologies if it seems like a very ... I need to modify my SQL Statement to filter out all the records that I ...
    (microsoft.public.access.queries)
  • Re: Retriveve records on a special day
    ... How can prepare a sql statement to retrieve records on a special day? ... Best regards, ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Retriveve records on a special day
    ... How can prepare a sql statement to retrieve records on a special day? ... Best regards, ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • minumn and maximum
    ... what is the mininum and maximum value in SQL statement ... then it will show up all the value in table1 ... Prev by Date: ...
    (microsoft.public.dotnet.framework.adonet)