X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1B166D1D38E for ; Mon, 8 Mar 2004 14:01:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 97894-09 for ; Mon, 8 Mar 2004 10:01:05 -0400 (AST) Received: from localhost.localdomain (unknown [200.208.40.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3579AD1CCC5 for ; Mon, 8 Mar 2004 10:01:00 -0400 (AST) Received: from yahoo.com.br (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i28EAhNM003252 for ; Mon, 8 Mar 2004 11:10:49 -0300 Message-ID: <404C7EE3.8010006@yahoo.com.br> Date: Mon, 08 Mar 2004 11:10:43 -0300 From: Daniel Henrique Alves Lima Reply-To: email_daniel_h@yahoo.com.br User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Simple SQL question Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/55 X-Sequence-Number: 17154 Hello, everybody. I've a simple question about SQL usage but i don't know even i can formulate this question. Well, i will try : I've a teacher_course table with columns cd_course, cd_teacher => teacher_course(cd_teacher,cd_course) and i've a set of pairs that contains the values for these columns, like {(1,2),(23,11),(563,341),...}. Is there a way to build a query to select rows that matchs these pairs ? Like a "in" extension (or something else) : select * from teacher_course where (cd_course,cd_teacher) in ((1,2),(23,11),(563,341)) ? I would appreciate any help. Thanks in advance.