Search Postgresql Archives

Re: Inserting Data

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

 



On Wed, Aug 23, 2006 at 05:34:27PM -0700, Bob Pawley wrote:
> Could you explain why Postgresql simply doesn't accept the simple 'where' 
> statement that was in my earlier e-mail.

Because INSERT doesn't take a WHERE clause.  If you want to do the
insert conditionally then use an IF statement as Tom suggested or
use INSERT ... SELECT with a WHERE clause that would restrict the
SELECT result to an empty set if the insert shouldn't happen.

-- 
Michael Fuhr


[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