pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
To: zot@ZotConsulting.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Stupid SQl question on inserting items
Date: Tue, 25 May 1999 15:31:15 -0400 (EDT)
Message-ID: <m10mMux-0000bIC@druid.net> (raw)
In-Reply-To: <374ADE8E.E7895F5@ZotConsulting.com>

Thus spake Zot O'Connor
> This is a dumb basic level SQL question.
> 
> is there any other way to insert records without having to fill in all
> of the values as in
> 
> INSERT into table_name WITH VALUES (blah, blah, blah...)

Yes.  Specify the fields in the insert.

INSERT INTO table_name (field1, field2, field4) VALUES (val1, val2, val4);

This is a good idea in any case even when inserting to all fields in case
something changes in the database schema.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.



view thread (5+ messages)

Message-ID: <m10mMux-0000bIC@druid.net>
Permalink:  ../m10mMux-0000bIC@druid.net/
Also on:    postgresql.org/message-id/m10mMux-0000bIC@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: darcy@druid.net, zot@ZotConsulting.com
  Subject: Re: [SQL] Stupid SQl question on inserting items
  In-Reply-To: <m10mMux-0000bIC@druid.net>
  References: <374ADE8E.E7895F5@ZotConsulting.com> <m10mMux-0000bIC@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox