| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера