How to write such a query?

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: How to write such a query?
Date: 2022-01-06 06:39:59
Message-ID: CA+FnnTzgQ3c75FE-eEPYVOa+F9N94jUpwW278ki_OeCJetovOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amul Sul 2022-01-06 06:46:16 Re: How to write such a query?
Previous Message Adrian Klaver 2022-01-05 20:34:50 Re: How best to create and use associative array type in Postgres?