Is there a combination of “LIKE” and “IN” in SQL?

后端 未结 25 1625
灰色年华
灰色年华 2020-11-22 03:08

In SQL I (sadly) often have to use \"LIKE\" conditions due to databases that violate nearly every rule of normalization. I can\'t change that right now. But tha

25条回答
  •  长情又很酷
    2020-11-22 03:39

    With PostgreSQL there is the ANY or ALL form:

    WHERE col LIKE ANY( subselect )
    

    or

    WHERE col LIKE ALL( subselect )
    

    where the subselect returns exactly one column of data.

提交回复
热议问题