Re: Substitute Variable in select query - Mailing list pgsql-general

From harish supare
Subject Re: Substitute Variable in select query
Date
Msg-id CAFsW9miBDBPnTdP1vBoXbZCx0E8n_Uf-MwiRr35YXYEoWRe7Qw@mail.gmail.com
Whole thread Raw
In response to Re: Substitute Variable in select query  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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.g.johnston@gmail.com> wrote:
On Monday, August 24, 2020, harish supare <harish.supare@gmail.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.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Substitute Variable in select query
Next
From: iulian dragos
Date:
Subject: Re: Query plan prefers hash join when nested loop is much faster