From: Daniel Henrique Alves Lima <email_daniel_h@yahoo.com.br>
To: pgsql-sql@postgresql.org
Subject: Simple SQL question
Date: Mon, 08 Mar 2004 11:10:43 -0300
Message-ID: <404C7EE3.8010006@yahoo.com.br> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: email_daniel_h@yahoo.com.br
Subject: Re: Simple SQL question
In-Reply-To: <404C7EE3.8010006@yahoo.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox