Does this work for any RDBMS?
CREATE TABLE TBLA (MYKEY CHAR (10 ), FLDA CHAR (10 ));
CREATE TABLE TBLB (MYKEY CHAR (10 ), FLDB CHAR (10 ));
CREATE TABLE TBLC (MYKEY CHAR (10 ), FLDC CHAR (10 ));
Query:
select mykey, flda, fldb, fldc
from tbla
join tblb using (mykey)
join tblc using (mykey)
Perhaps with an explicit join order?
select mykey, flda, fldb, fldc
from ((tbla
join tblb using (mykey))
join tblc using (mykey))
It doesn't seem to work in DB2 for IBM i 7.1...I get an SQL0203 - Name MYKEY is ambiguous at the second USING (MYKEY)
I'm wondering about the other DBMS.
SQL Fiddler shows it working with Oracle 11gR2 and MySQL 5.6.6 m9...but not MS SQL Server 2012; it apparently doesn't support the JOIN USING syntax.
http://sqlfiddle.com/#!4/ad8c0
It'd be nice to have some confirmation from actual users of those DBs and any others that chime in; particularly DB2 for LUW.