Re: [SQL] Stupid SQl question on inserting items

Поиск
Список
Период
Сортировка
От D'Arcy" "J.M." Cain
Тема Re: [SQL] Stupid SQl question on inserting items
Дата
Msg-id m10mMux-0000bIC@druid.net
обсуждение исходный текст
Ответ на Stupid SQl question on inserting items  ("Zot O'Connor" <zot@ZotConsulting.com>)
Список 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@{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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Steven M. Wheeler"
Дата:
Сообщение: Re: [SQL] Fatal process interaction
Следующее
От: JT Kirkpatrick
Дата:
Сообщение: using like