X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AF6A59FABE7 for ; Mon, 26 Jun 2006 20:04:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 41417-07 for ; Mon, 26 Jun 2006 20:04:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web33301.mail.mud.yahoo.com (web33301.mail.mud.yahoo.com [68.142.206.116]) by postgresql.org (Postfix) with SMTP id 919F69FA2F7 for ; Mon, 26 Jun 2006 20:04:27 -0300 (ADT) Received: (qmail 79034 invoked by uid 60001); 26 Jun 2006 23:03:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vtVm2usGNtRRAZ4yiokOwEitOTywp3laXgNMa+Dh48RfapEZUw+KMRciejssGL87HU5yYbAoFlmNdNx+WNHE3lI5n4YqpzQsmNz4DjL4+UZQ1PWS60DWXa/xTED3tW9mlpqoJXrvcUVZfThgEaqa7LmFlfzkb2J2Yv7nam/jGDc= ; Message-ID: <20060626230355.79032.qmail@web33301.mail.mud.yahoo.com> Received: from [12.9.179.126] by web33301.mail.mud.yahoo.com via HTTP; Mon, 26 Jun 2006 16:03:55 PDT Date: Mon, 26 Jun 2006 16:03:55 -0700 (PDT) From: Subject: Problem w/ Join... Using (...) Syntax To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/273 X-Sequence-Number: 25509 how does one apply the JOIN... USING (...) syntax when the primary key and foreign key have different names? JOIN t_employee USING (employee_id) works perfect when the primary and foreign key are both named employee_id. however, it one is named inspector_id and the other employee_id, it doesn't work - or at least i haven't been able to find the appropriate syntax through searching and trial and error. tia... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com