Re: logical fields with defaults - Mailing list pgsql-novice

From David G Johnston
Subject Re: logical fields with defaults
Date
Msg-id 1409360422717-5816994.post@n5.nabble.com
Whole thread Raw
In response to logical fields with defaults  (Jude DaShiell <jdashiel@panix.com>)
List pgsql-novice
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.


pgsql-novice by date:

Previous
From: David G Johnston
Date:
Subject: Re: Join three tables and specify criteria... I know this should be easy!
Next
From: Jude DaShiell
Date:
Subject: Re: weekdays display in postgresql