Re: COL unique (CustomerID) plus COL unique (COUNT) inside CustomerID

Поиск
Список
Период
Сортировка
От Szymon Lipiński
Тема Re: COL unique (CustomerID) plus COL unique (COUNT) inside CustomerID
Дата
Msg-id CAFjNrYtdEUxvwO25zuj0afR39NCNHSEVkSUyaFN4+ZqwWGtp9A@mail.gmail.com
обсуждение исходный текст
Ответ на COL unique (CustomerID) plus COL unique (COUNT) inside CustomerID  (Michelle Konzack <linux4michelle@gmail.com>)
Список pgsql-general
Hi,
you can use the UNIQUE constraint with two columns: UNIQUE(CustID, Count).


regards,
Szymon Lipiński


On 1 September 2016 at 11:28, Michelle Konzack <linux4michelle@gmail.com> wrote:
Hello to all,

after a period of silence from Debian, Courier, PHP and PostgreSQL I  am
half back and running into a problem...  :-/

I need a table with an UNIQUE CustomerID which is working fine...

...BUT I need also a second column with a count, which  must  be  UNIQUE
inside the CustomerID.

In clear this:

    CustID       Count
         1           1
         1           2
         1           3

         2           1
         2           2

         3           1
         3           2
         3           3
         ...

How to do this?

Thanks in avance

--
Michelle Konzack        ITSystems
GNU/Linux Developer     0033-6-61925193


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


 

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

Предыдущее
От: Michelle Konzack
Дата:
Сообщение: COL unique (CustomerID) plus COL unique (COUNT) inside CustomerID
Следующее
От: Daniel Caldeweyher
Дата:
Сообщение: Re: Do function calls the cached?