query variables

From: j0rd1 adame <jordi(at)jordi(dot)net>
To: Postgres mailing list general <pgsql-general(at)postgresql(dot)org>
Subject: query variables
Date: 2005-01-28 01:29:24
Message-ID: 200501271929.26847.jordi@jordi.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi:
Is there any way to save the result of a query in a variable, so that i could
use that value in another query??

something like set VARIABLENAME = select count(1) from table;
and then
select 56778/VARIABLENAME as final_result;

thanks
--
Jordi Adame V
jordi (.a.) jordi.net
http://www.lawaloca.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-01-28 01:42:33 Re: Problem with the copy command need help
Previous Message Jonel Rienton 2005-01-28 01:25:51 Re: changing sort_mem on the fly?