db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayaram Subramanian <rsjay1...@gmail.com>
Subject Buddy Testing of Using Clause
Date Thu, 29 Apr 2010 02:31:16 GMT
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