Search Postgresql Archives

Re: PostgreSQL primary (sequence) key issue (Ruby/Rails)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The portable (and correct) way to do it is to use the DEFAULT keyword
> like this:
> 
> INSERT INTO some_table (id_field) VALUES (DEFAULT);

Alternatively, for columns for which you have no value, don't specify them
at all in the insert.

-- 
Scott Ribe
scott_ribe@xxxxxxxxxxxxxxx
http://www.killerbytes.com/
(303) 722-0567 voice




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux