| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Table with one row
>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 - 10:02:13 CDT
![]() |
![]() |