Обсуждение: Column question

Поиск
Список
Период
Сортировка

Column question

От
"Williams, Travis L, NPONS"
Дата:
I'm wanting to make a column named "denied" with a default of "Y" and only
be able to have two possible values "Y" or "N".. any help..!!??  Thanks in
advance..

Travis

Re: Column question

От
harrold@sage.che.pitt.edu
Дата:
hey.

perhaps you could use the datatype "boolean". where true can be Y and
false can be N.

possibly something like:

CREATE TABLE tablename
    (denied boolean DEFAULT true);

i cannot try it out here, but it might work
--
john

Sometime in June Williams, Travis L, NPONS assaulted keyboard and produced...

|I'm wanting to make a column named "denied" with a default of "Y" and only
|be able to have two possible values "Y" or "N".. any help..!!??  Thanks in
|advance..
|
|Travis
|
|---------------------------(end of broadcast)---------------------------
|TIP 5: Have you checked our extensive FAQ?
|
|http://www.postgresql.org/users-lounge/docs/faq.html
|