felipe.zkn
felipe.zkn

Reputation: 2060

Array in the IN operator

Does someone know how can I use an array in the IN operator in plpgsql?

SELECT INTO unsolvedNodes array_agg(idDestination)
FROM road 
WHERE idOrigin IN ???

Upvotes: 1

Views: 138

Answers (2)

felipe.zkn
felipe.zkn

Reputation: 2060

The code below solved my problem.

SELECT INTO unsolvedNodes array_agg(idDestination)
FROM road
WHERE idOrigin = ANY(solvedNodes);

Upvotes: 2

arms
arms

Reputation: 801

DELETE FROM entry_coll_tag
WHERE  entry_id = obj_id
AND tag_id = ANY(coll_ids);

It's just like that.

Upvotes: 0

Related Questions