Re: Substitute Variable in select query

From: harish supare <harish(dot)supare(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Substitute Variable in select query
Date: 2020-08-24 14:21:03
Message-ID: CAFsW9miBDBPnTdP1vBoXbZCx0E8n_Uf-MwiRr35YXYEoWRe7Qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thanks for the reply David.

In case of Colon I need to set the variable first, my requirement is my
select query should prompt for the input.

On Mon, 24 Aug 2020 at 10:15 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Monday, August 24, 2020, harish supare <harish(dot)supare(at)gmail(dot)com> wrote:
>
>> Hi Team,
>>
>> Would like to know what the substitute/input variable available in psql.
>>
>>
>> Oracle we use & - select a, b , c from table where a like &a;
>>
>> Is there an alternative in psql?
>>
>>
>> Colon - read the documentation, psql section, for the exact syntax.
>
> David J.
>
>
> --
Best Regards
Harish.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message iulian dragos 2020-08-24 14:21:43 Re: Query plan prefers hash join when nested loop is much faster
Previous Message David G. Johnston 2020-08-24 14:15:16 Re: Substitute Variable in select query