Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 527E8476025 for ; Mon, 8 Jul 2002 10:52:33 -0400 (EDT) Mailbox-Line: From traderx@gmx.ch Mon Jul 8 10:52:33 2002 Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 46FD4476025 for ; Mon, 8 Jul 2002 09:27:17 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 2B66B3820D1; Mon, 8 Jul 2002 09:26:25 -0400 (EDT) From: "Roger Mathis" X-Newsgroups: comp.databases.postgresql.sql Subject: Variables in PSQL Date: Mon, 8 Jul 2002 15:24:18 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Lines: 17 Message-ID: <3d299272$0$1005$7402020d@newsfeed.sunrise.ch> To: pgsql-sql@postgresql.org X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.30 X-Spam-Level: X-Archive-Number: 200207/108 X-Sequence-Number: 8487 Hi I'm trying to declare a variable in PostgreSQL, so I can save some values in it. After, I want to calculate with this variable. For example: declare vp integer; select price into :vp from article where anr = 1; vp := vp + 1; update article set price = :vp where anr = 1; Is there a posibility to do that without creating a funktion? Thanks for your answers. CU Roger