| From: | "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net> | 
|---|---|
| To: | zot(at)ZotConsulting(dot)com (Zot O'Connor) | 
| Cc: | pgsql-sql(at)postgreSQL(dot)org | 
| Subject: | Re: [SQL] Stupid SQl question on inserting items | 
| Date: | 1999-05-25 19:31:15 | 
| Message-ID: | m10mMux-0000bIC@druid.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
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(at){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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | JT Kirkpatrick | 1999-05-25 20:13:05 | using like | 
| Previous Message | Steven M. Wheeler | 1999-05-25 19:14:37 | Re: [SQL] Fatal process interaction |