Hi,
On Fri, Mar 15, 2002 at 11:47:27AM -0500, Darren Ferguson wrote:
> You can give the primary key a name when you are creating the table just
> like you can give indexes, foreign keys, unique etc
>
> create table foo (
> foo_pkey integer not null,
> foo_data varchar(50) not null,
> CONSTRAINT foo_pk PRIMARY KEY(poo_pkey)
> )
> ;
>
> The primary key for this table is called foo_pk
Well, that isn't quite what I meant. I know I can do that. Maybe my
explanation was a bit misleading.
Suppose, I've got the table shown above. I've only got its name. What
I want is the column name the primary key is created on. How can I do
that? Basically, which of foo_pkey and foo_data is the primary key?
Cheers,
Chris
--
Christian von Kietzell
mailto: chris@gammu.ath.cx
Jabber: cuboci@charente.de