Re: How to write such a query?

From: Amul Sul <sulamul(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to write such a query?
Date: 2022-01-06 06:46:16
Message-ID: CAAJ_b95B-6McpV8OjfreEnqUCirP-Yp4hyXx617f=fokbmQBsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

See prepare statement : https://www.postgresql.org/docs/current/sql-prepare.html

On Thu, Jan 6, 2022 at 12:10 PM Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>
> Hi, ALL,
> In SQLite you can write:
>
> SELECT a, b, c FROM foo WHERE id = :id;
>
> where ":id" is the named parameter.
>
> The query above is similar to
>
> SELECT a,b,c FROM foo WHERE id = ?;
>
> except that the parameter has a name.
>
> Is there a way to write such a SELECT statement with the
> named parameter in PostgreSQL?
>
> Thank you.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-01-06 07:00:53 Re: How to write such a query?
Previous Message Igor Korot 2022-01-06 06:39:59 How to write such a query?