Re: how do i insert a default value?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Andy Kriger <akriger(at)greaterthanone(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: how do i insert a default value?
Date: 2002-11-12 17:19:59
Message-ID: Pine.LNX.4.33.0211121018440.24725-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 12 Nov 2002, Andy Kriger wrote:

> How do you insert a default value in an insert statement that doesn't
> specify column names? For example, I have a table with 20 columns. I don't
> want to specify the names in order to skip columns that have default values.
>
> In MySql a null or empty value uses the default column value. In Postgres?

Postgresql uses the keyword DEFAULT with no ticks to get a default.

insert into table bubba values ('truck','washer',DEFAULT,'gun
rack',DEFAULT,36,24,36);

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2002-11-12 17:22:54 Re: Upgrade to dual processor machine?
Previous Message scott.marlowe 2002-11-12 17:11:14 Re: Upgrading from 7.1.3 to 7.2.3