Re: automatic insert of next sequence value? - Thank you!
| От | J B Bell |
|---|---|
| Тема | Re: automatic insert of next sequence value? - Thank you! |
| Дата | |
| Msg-id | 20001012105644.B6823@staff.intergate.ca обсуждение исходный текст |
| Ответ на | Re: automatic insert of next sequence value? (Alfred Perlstein <bright@wintelcom.net>) |
| Список | pgsql-general |
On Thu, Oct 12, 2000 at 10:22:10AM -0700, Alfred Perlstein wrote:
>> [JB asks about why INSERT INTO foo VALUES ( 0, ... ) doesn't trip the
>> default value]
>
> This is because you're abusing INSERT, the porper way to do insert is
> to specifify which columns explicitly:
>
> INSERT INTO foo (col1, col3) VALUES ( 5, 6 );
>
> now, if col2 has a default value it will be set properly.
I feel so dirty. I only hope the INSERT statement can forgive me, and that
I can make reparations for my sins. :-)
> -Alfred
Thanks Alfred, and to the several other people who responded so quickly
to my, ahem, query. No need to cc: me, btw, I'm on the list and hope to
learn more from it.
--JB
--
------------------------------------------------------------------
J B Bell | /~\
Systems Administrator | ASCII \ / Against
Internet Gateway | Ribbon X HTML
| Campaign / \ Mail
В списке pgsql-general по дате отправления: