Subject | Re: [firebird-support] Help with select statement |
---|---|
Author | Ann W. Harrison |
Post date | 2005-06-28T19:45:49Z |
William L. Thomson Jr. wrote:
I'm sure I've missed something but that's the usual way of asking for
all records from a table.
where not exists (select 1 from b where b.field1 = c.field1
and b.field2 = c.field2 ...)
What have I missed?
Regards,
Ann
> I have two tables that I need to query, ... linked via foreign keys toselect <field list> from B
> one main table. Table names are A,B,C with the main one being A.
>
> Now when data is put into table B it can also go into table C as well. I
> basically need to get the differences between tables B and C in two
> queries. Table B having unique data, and table C having that same data,
> and more.
>
> I need one query that returns all records in table B.
I'm sure I've missed something but that's the usual way of asking for
all records from a table.
> Then another queryselect <field list> from c
> that returns only the records in C, that are not in B.
where not exists (select 1 from b where b.field1 = c.field1
and b.field2 = c.field2 ...)
What have I missed?
Regards,
Ann