Re: logical fields with defaults

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

Re: logical fields with defaults

От:
David G Johnston <david.g.johnston@gmail.com>
Дата:
Jude DaShiell wrote
> How would one do a statement in a create table structure such that a 
> logical field was defined with a default value a user could change with 
> populating that table?

Not syntax checked, look at the create table documentation if it doesn't
work...

CREATE TABLE tbl (
bool_field Boolean DEFAULT true
);

Insert into tbl (bool_field) values (false);

David J.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/logical-fields-with-defaults-tp5816951p5816994.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

logical fields with defaults

От:
Jude DaShiell <jdashiel@panix.com>
Дата:
How would one do a statement in a create table structure such that a 
logical field was defined with a default value a user could change with 
populating that table?


FAQ