Simple, Add constraint

Поиск
Список
Период
Сортировка
От nhrcommu@rochester.rr.com
Тема Simple, Add constraint
Дата
Msg-id c3bd85c449d3f.49d3fc3bd85c4@nyroc.rr.com
обсуждение исходный текст
Ответы Re: Simple, Add constraint  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-novice
Working under the premise that "no question is too simple for this list"

Trying to add a constraint so that all phone numbers will be in a
'111-222-3333' format.  Tried a few combos, with below the latest effort.

ALTER TABLE "fortour"."mine" ADD CONSTRAINT mine_cnstr_2 CHECK (phone
LIKE '999s999s9999')

and .... LIKE '999-999-9999'

A constraint for length is in place without a problem.
Any help appreciated.

Thanks,
Mike Ellsworth

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: meaning of "create role"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: meaning of "create role"