Re: Table with one row

From: <zeldorblat_at_gmail.com>
Date: 20 Oct 2005 08:02:13 -0700
Message-ID: <1129819798.237860.50950_at_g47g2000cwa.googlegroups.com>


>A simple way to avoid more than one row is to add a dummy column with a
>unique constraint combined with a check clause. Something like
>
>... ,dummycol integer default 1 not null check (dummycol = 1) unique, ...
>
>(Will not prohibit zero rows...)
>
>> Second, to be relationally correct, the table needs a primary key.
>> What might the key be in this situation? It seems silly to add an
>> identity column since
>
>Why not use the dummycol as PK? (And then you can remove the NOT NULL and
>unique constraints.)
>
>HTH,
>Jarl

That's the solution I would have proposed had I thought of it :) Thanks for your help -- that's perfect. Received on Thu Oct 20 2005 - 17:02:13 CEST

Original text of this message