Re: Update PK Violation

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: Franklin Haut <franklin(dot)haut(at)gmail(dot)com>
Subject: Re: Update PK Violation
Date: 2008-01-16 14:30:14
Message-ID: 200801161630.15623.achill@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Στις Tuesday 15 January 2008 23:03:49 ο/η Franklin Haut έγραψε:
> Hi all,
>
> i have a problem with one update sentence sql.
>

A simple way i use:

foodb=# update temp set num = num*1000 where num >= 5;
foodb=# insert into temp values (5, 'NOT');
foodb=# update temp set num = 1 + num/1000 where num >= 6;

--
Achilleas Mantzios

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bryan Emrys 2008-01-16 15:54:41 Re: SQL dealing with subquery
Previous Message Fernando Hevia 2008-01-16 13:32:00 Re: Update PK Violation