Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I do this in SQl
That should work :
SELECT count(*)
FROM table_a, table_b
WHERE table_b.y = 'LONDON' and
table_a.z = table_b.z;
It helps to have an index
Michael.
In article <7rub0i$si2$1_at_nnrp1.deja.com>,
namnan_at_my-deja.com wrote:
> I want to ask the following question in SQL:
>
> I have two tables A and B, where table B contains a column Y that is a
> long text description of another column in B (say column Z).
> So, eg, Y contains 'London' and Z contains 'L'.
> The values of this column Z also exists in Table A (say column Q). So
Q
> contains 'L'.
>
> How can I say:
>
> Give me count of all the rows in TableA where TableB.Y = 'London';
>
> Thanks in advance
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Sun Sep 19 1999 - 09:35:09 CDT
![]() |
![]() |