On Tue, Jan 23, 2007 at 01:07:19PM -0800, codeWarrior wrote:
> No... its a table constraint using a unique, implicit index on the listed
> columns. .
Sure. But since these get added as table constraints after dump
anyway, I'm not sure I see why it makes a difference.
In any case, the point is
No... its a table constraint using a unique, implicit index on the listed
columns. .
PRIMARY KEY ( column [, ...] )
The PRIMARY KEY table constraint is similar to the PRIMARY KEY column
constraint. As a table constraint, PRIMARY KEY allows multiple columns to be
defined in a parenthetical exp
On Fri, Jan 19, 2007 at 07:45:40PM -0800, codeWarrior wrote:
> AFAIK: You cannot have multiple primary keys. How would you know which one
> is the actual key ?
You can have a multi-column primary key, though. That's a perfectly
legitimate approach.
> FYI: What you are really talking about are t
> 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,
Richa
--
AFAIK: You cannot have multiple primary keys. How would you know which one
is the actual key ?
FYI: What you are really talking about are table contraints... When you have
multiple unique column constraints -- they are generally referred to as
"table constraints" not multiple primary keys
On Fri, Jan 19, 2007 at 16:44:50 -0800,
mawrya <[EMAIL PROTECTED]> wrote:
> I have set up a table with a multi-column primary key constraint:
>
> If I had a row in the table where systemid=123, enclosureid=ab,
> pointid=56, I would have a Primary Key ("ID") of 123ab56 for that row.
>
> I now w
I have set up a table with a multi-column primary key constraint:
CREATE TABLE iopoints
(
enclosureid numeric(3) NOT NULL,
pointid char(4) NOT NULL,
equipmentgroup varchar(64) NOT NULL,
deviceid varchar(8),
devicetype varchar(24),
operationdesc varchar(64) NOT NULL,
entrytime timestamp NOT