From: | Daniel Henrique Alves Lima <email_daniel_h(at)yahoo(dot)com(dot)br> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Simple SQL question |
Date: | 2004-03-08 14:10:43 |
Message-ID: | 404C7EE3.8010006@yahoo.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Henrique Alves Lima | 2004-03-08 15:19:36 | Functional index and string concatenation |
Previous Message | Radu-Adrian Popescu | 2004-03-08 12:49:07 | Re: Login information in system tables |