len8200
len8200

Reputation: 85

How to correctly create a query to get information from the PostgreSQL database?

How, with one request, to get two records from table "Table" with id = 12 and id = 17 in PostgreSQL database?

Upvotes: 0

Views: 39

Answers (1)

qvotaxon
qvotaxon

Reputation: 369

You can achieve this by using a where in clause:

where id in (12,17);

Fiddle: https://www.db-fiddle.com/f/4jyoMCicNSZpjMt4jFYoz5/696

Upvotes: 1

Related Questions