Re: select based on multi-column primary keys

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>, mawrya <mawrya(at)furthernorth(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: select based on multi-column primary keys
Date: 2007-01-20 04:57:37
Message-ID: 244523.74626.qm@web31808.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> SELECT * FROM iopoints WHERE systemid=123 AND enclosureid='ab' AND pointid=56

A slight variation of the syntax would be:

select * from iopoints where (systemid, enclosureid, pointid) = (123,'ab',56);

this table and fields sounds alot like a control system be being modeled. :-)

Regards,
Richard Broersma Jr.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2007-01-21 15:28:38 Re: select based on multi-column primary keys
Previous Message codeWarrior 2007-01-20 03:45:40 Re: select based on multi-column primary keys