Hi,
I assumed that you was used MySQL for database. With MySQL you
can used this SQL to find different row
select tblcd.* from tblcd left join tblorder on
tblcd.cdid=tblorder.cdid where tblorder.cdid is null
sommai
At 12:37 28/2/2002 +1000, Adam Royle wrote:
>Hi.
>
>I need
select * from tblCd
where cdId not in (select distinct cdId from tblOrders);
On Thu, Feb 28, 2002 at 12:37:49PM +1000, Adam Royle wrote:
> Hi.
>
> I need some guidance for writing an effective query (instead of processing
> through PHP).
>
> I lets says I have two tables, tblCDs and tblOrders.
SELECT
tblCD.cdID,
tblCD.cdTitle,
tblCD.cdArtist
FROM
tblCD,
tblOrders
WHERE
tblOrders.cdID = tblCD.cdID
AND tblCD.cdID NOT IN (
SELECT cdID FROM tblOrders
)
The support for this sort of "nested query" will very betwe