Re: logical fields with defaults

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: logical fields with defaults
Date: 2014-08-30 01:00:22
Message-ID: 1409360422717-5816994.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jude DaShiell 2014-08-30 10:11:21 Re: weekdays display in postgresql
Previous Message David G Johnston 2014-08-30 00:34:32 Re: Join three tables and specify criteria... I know this should be easy!