When using postgres, we sometimes need to find fields that match multiple like queries. 

In this situation we can use like any. Making use of the any expression.

Example:

select * from some_table where some_field like any  (
    select '%'||some_other_field||'%' from some_other_table
);

 

Matt Reid

Lead Software Architect. Java/Node enthusiast, badminton lover, foodie.

drei01 Matthew_Reid


Published