X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 36DE2D1B169; Fri, 11 Jun 2004 06:46:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22730-06; Fri, 11 Jun 2004 09:46:29 +0000 (GMT) Received: from linux.ceedees.com (unknown [202.9.172.97]) by svr1.postgresql.org (Postfix) with ESMTP id 4537CD1B1AA; Fri, 11 Jun 2004 06:46:24 -0300 (ADT) Received: from ceedees.com (vpsd4.ceedees.com [192.168.0.53]) by linux.ceedees.com (8.11.6/linuxconf) with ESMTP id i5B9dIn16665; Fri, 11 Jun 2004 15:09:18 +0530 Message-ID: <40C97EE7.8030901@ceedees.com> Date: Fri, 11 Jun 2004 15:14:07 +0530 From: sathish User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: doubt Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/159 X-Sequence-Number: 13819 dear groups, i have a doubt in sql, i have a table staff_skills in which i have set a table level constraint to create a primary key of two fields . so 'name' and 'skill' combinedly forms a primary key. now the issue is in another table i have only 'name' field and i want to create a foreign key constraint which refers the staff_skills table's 'name' field only. staff_skills (table) - name,skill,ability (columns) --- primary key(name,skill) staff_xxxx (table) - name,x,y,z (columns) --- foreign key(name) references staff_skills(name). how to do the above? your immediate reply will be helpful yours sincerely SathishKumar.S