db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Buddy Testing of Using Clause
Date Thu, 29 Apr 2010 16:23:57 GMT
Hi Jayaram,

The Reference Guide documents a fair amount of complexity related to the 
USING clause:

1) In expanding * in the SELECT list, both when * occurs by itself and 
when it is qualified with a table name

2) In transforming the USING clause into an ON clause when the column 
names are unqualified for different kinds of joins

It would be great if you could verify these cases.

Thanks,
-Rick

Jayaram Subramanian wrote:
> Hi,
> Could  i have your thoughts and more ideas for testing the "using"
> functionality..
>
> With Regards
> Jayaram
>
> On Wed, Apr 28, 2010 at 10:31 PM, Jayaram Subramanian
> <rsjay1976@gmail.com> wrote:
>   
>> Hi,
>> I tried the following view based scenario of the using clause and
>> found the code flow through without issues
>> s.execute("create table t1(a int, b int, c int)");
>> s.execute("create table t2(a int, b int, c int)");
>> s.execute("create table t3(a int, b varchar(5), c int)");
>> s.execute("create view aview(a,b) as select a,t3.c from t1 join t3
>> using (c,a)");
>>                s.execute("insert into t1 values (1,2,3),(2,3,4),(4,4,4)");
>>                s.execute("insert into t2 values (1,2,3),(2,3,4),(5,5,5)");
>>                s.execute("insert into t3 values " +
>>                        "(2,'abc',8),(4,'def',10),(null,null,null)");
>> ResultSet rs=s.executeQuery("select * from aview join t1 using (b)");
>>
>> With Regards
>> Jayaram
>>
>>     
>
>   


Mime
View raw message