Search Postgresql Archives

Re: Stored procedure

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

 



On Thu, 2005-12-22 at 12:42 -0500, Jaime Casanova wrote:
> On 12/22/05, Ted Byers <r.ted.byers@xxxxxxxxxx> wrote:
> >
> > INSERT INTO foo (auto,text)
> >     VALUES(NULL,'text');              # generate ID by inserting NULL
> 
> and this of course is bad... if a insert NULL i want the NULL to be inserted.
> SQL Standard way of doing things is "ommiting the auto incremental fld at all"
> 
> INSERT INTO foo (text) VALUES ('text');

and then there is the god old DEFAULT value:

  INSERT INTO foo (auto,text) VALUES(DEFAULT,'text');


gnari




[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