Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Join Statement - (parameter)
Select a.field1, field 2, field3, field4, field5
from table1 a, table 2 b
where a.field1 = b.field1
and a.field1 = '&inputVariable';
--
Matt Brennan
SQL*Tools Specialist
GERS Retail Systems
9725-C Scranton Road
San Diego, California 92121
1-800-854-2263
mbrennan_at_gers.com
(Original email address is spam-blocked.)
Daniel <d717_at_pacific.net.sg> wrote in article
<35a37d07.1810140_at_news.pacific.net.sg>...
> I have two tables with a common key field "a"
>
> Table1 Table2
> -field1 field1
> -field2 field4
> -field3 field5
>
> Based on an input parameter, I would like to retrieve the record where
> (field1 = input Variable) and list out all the fields from both
> table 1 and table2.
>
> When I deal with a single table (table1), I use the SQL statement ;
>
> Select field1, field 2, field3
> from table1
> where field1 = inputVariable;
>
> Hope some of you could help me with these SQL Join statement...
>
> Thanx.
Received on Wed Jul 08 1998 - 17:26:56 CDT
![]() |
![]() |