db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Segel" <mse...@mycingular.blackberry.net>
Subject Re: can we use a PK in where clause ?
Date Wed, 18 Oct 2006 15:34:24 GMT
If your PK is colA,colB,colZ then in your where clause use
WHERE colA=?
AND colB=?
AND colZ=?

Followed by the rest of your where clause.   The optimizer should then choose the pk index.
Sent via BlackBerry.

-Mike Segel
312 952 8175

-----Original Message-----
From: Legolas wood <legolas.w@gmail.com>
Date: Wed, 18 Oct 2006 18:43:19 
To:Derby Discussion <derby-user@db.apache.org>
Subject: can we use a PK in where clause ?

thank you for reading my post
can we use a PK (which is composed of more than one column) in a where
clause ?
or better i ask how we can retrieve the PK values when they are composite

View raw message