Re: create table with multiple unique fields

Поиск
Список
Период
Сортировка
От Ed Yu
Тема Re: create table with multiple unique fields
Дата
Msg-id lZ9_7.53230$8e2.17249828@typhoon.southeast.rr.com
обсуждение исходный текст
Список pgsql-general
create a unique index on all three columns, a subsequence insert of existing
combination should error out.

"Karl Raven" <lcaasia@pd.jaring.my> wrote in message
news:a1b1fs$t0a$1@news.tht.net...
> Hi,
>
> I'd like to create a table with 3 create unique fields :
>
> fields
> warehouseno,loc, productid, qty, qtyalllocated
>
> i'd like warehouseno,loc, productid to be unique..
> meaning
> 2000, ABC, X           - ok
> 2000,ABC,Y            -ok
> 2000,ABC,X            - reject
> 2000,BCD,X            - ok
>
> anyone knows how to do so?
>
> thanks
>
>
>
>



В списке pgsql-general по дате отправления:

Предыдущее
От: "Nikola Milutinovic"
Дата:
Сообщение: Encapsulation of tables with functions
Следующее
От: root@localhost.localdomain (Jules Alberts)
Дата:
Сообщение: Re: three tier woes (audit policies ???)